New-LMCachedAccount
Syntax
Section titled “Syntax”Lmv1 (Default)
Section titled “Lmv1 (Default)”New-LMCachedAccount -AccessId <String> -AccessKey <String> -AccountName <String> [-CachedAccountName <String>] [-OverwriteExisting <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]Bearer
Section titled “Bearer”New-LMCachedAccount -AccountName <String> -BearerToken <String> [-CachedAccountName <String>] [-OverwriteExisting <Boolean>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”The New-LMCachedAccount function stores LogicMonitor portal credentials securely for use with Connect-LMAccount.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”#Cache LMv1 credentialsNew-LMCachedAccount -AccessId "id123" -AccessKey "key456" -AccountName "company"Example 2
Section titled “Example 2”#Cache Bearer tokenNew-LMCachedAccount -BearerToken "token123" -AccountName "company" -CachedAccountName "prod"Parameters
Section titled “Parameters”-AccessId
Section titled “-AccessId”The Access ID from your LogicMonitor API credentials.
Type: StringParameter Sets: LMv1Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-AccessKey
Section titled “-AccessKey”The Access Key from your LogicMonitor API credentials.
Type: StringParameter Sets: LMv1Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-AccountName
Section titled “-AccountName”The portal subdomain (e.g., “company” for company.logicmonitor.com).
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-BearerToken
Section titled “-BearerToken”The Bearer token for authentication (alternative to AccessId/AccessKey).
Type: StringParameter Sets: BearerAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-CachedAccountName
Section titled “-CachedAccountName”The name to use for the cached account. Defaults to AccountName.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: $AccountNameAccept pipeline input: FalseAccept wildcard characters: False-OverwriteExisting
Section titled “-OverwriteExisting”Whether to overwrite an existing cached account. Defaults to false.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-WhatIf
Section titled “-WhatIf”Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameterParameter Sets: (All)Aliases: wi
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: SwitchParameterParameter Sets: (All)Aliases: cf
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “CommonParameters”This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
Section titled “Inputs”None. You cannot pipe objects to this command.
Section titled “None. You cannot pipe objects to this command.”Outputs
Section titled “Outputs”None. Returns success message if account is cached successfully.
Section titled “None. Returns success message if account is cached successfully.”This command creates a secure vault to store credentials if one doesn’t exist.