New-LMCachedAccount
Syntax
Section titled “Syntax”LMv1 (Default)
Section titled “LMv1 (Default)”New-LMCachedAccount -AccessId <string> -AccessKey <string> -AccountName <string> [-CachedAccountName <string>] [-OverwriteExisting <bool>] [-GovCloud] [-WhatIf] [-Confirm] [<CommonParameters>]Bearer
Section titled “Bearer”New-LMCachedAccount -AccountName <string> -BearerToken <string> [-CachedAccountName <string>] [-OverwriteExisting <bool>] [-GovCloud] [-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"EXAMPLE 3
Section titled “EXAMPLE 3”#Cache FedRAMP GovCloud credentialsNew-LMCachedAccount -AccessId "id123" -AccessKey "key456" -AccountName "agency" -GovCloudParameters
Section titled “Parameters”-AccessId
Section titled “-AccessId”The Access ID from your LogicMonitor API credentials.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: LMv1 Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-AccessKey
Section titled “-AccessKey”The Access Key from your LogicMonitor API credentials.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: LMv1 Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-AccountName
Section titled “-AccountName”The portal subdomain (e.g., “company” for company.logicmonitor.com).
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Bearer Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: LMv1 Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-BearerToken
Section titled “-BearerToken”The Bearer token for authentication (alternative to AccessId/AccessKey).
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Bearer Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-CachedAccountName
Section titled “-CachedAccountName”The name to use for the cached account. Defaults to AccountName.
Type: System.StringDefaultValue: $AccountNameSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- cfParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-GovCloud
Section titled “-GovCloud”Connect using the LM GovCloud (FedRAMP) portal when this cached account is used.
Type: System.Management.Automation.SwitchParameterDefaultValue: FalseSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-OverwriteExisting
Section titled “-OverwriteExisting”Whether to overwrite an existing cached account. Defaults to false.
Type: System.BooleanDefaultValue: FalseSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-WhatIf
Section titled “-WhatIf”Runs the command in a mode that only reports what would happen without performing the actions.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- wiParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''CommonParameters
Section titled “CommonParameters”This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.