Connect-LMAccount
Syntax
Section titled “Syntax”Lmv1 (Default)
Section titled “Lmv1 (Default)”Connect-LMAccount -AccessId <String> -AccessKey <String> -AccountName <String> [-DisableConsoleLogging] [-AutoUpdateModuleVersion] [-SkipVersionCheck] [-GovCloud] [-SkipCredValidation] [-ProgressAction <ActionPreference>] [<CommonParameters>]Bearer
Section titled “Bearer”Connect-LMAccount -BearerToken <String> -AccountName <String> [-DisableConsoleLogging] [-AutoUpdateModuleVersion] [-SkipVersionCheck] [-GovCloud] [-SkipCredValidation] [-ProgressAction <ActionPreference>] [<CommonParameters>]SessionSync
Section titled “SessionSync”Connect-LMAccount -AccountName <String> [-SessionSync] [-DisableConsoleLogging] [-AutoUpdateModuleVersion] [-SkipVersionCheck] [-GovCloud] [-SkipCredValidation] [-ProgressAction <ActionPreference>] [<CommonParameters>]Cached
Section titled “Cached”Connect-LMAccount [-UseCachedCredential] [-CachedAccountName <String>] [-DisableConsoleLogging] [-AutoUpdateModuleVersion] [-SkipVersionCheck] [-GovCloud] [-SkipCredValidation] [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
Section titled “Description”Connect to a specified LM portal which will allow you run the other LM commands associated with the Logic.Monitor PS module. Used in conjunction with Disconnect-LMAccount to close a session previously connected via Connect-LMAccount
Examples
Section titled “Examples”Example 1
Section titled “Example 1”#Connecting to an Account using an Access ID and Access KeyConnect-LMAccount -AccessId xxxxxx -AccessKey xxxxxx -AccountName subdomainExample 2
Section titled “Example 2”#Connecting to an Account using a Bearer TokenConnect-LMAccount -BearerToken xxxxxx -AccountName subdomainExample 3
Section titled “Example 3”#Connecting to an Account using a Cached CredentialConnect-LMAccount -UseCachedCredential -CachedAccountName "CachedAccountName"Parameters
Section titled “Parameters”-AccessId
Section titled “-AccessId”Access ID from your API credential acquired from the LM Portal
Type: StringParameter Sets: LMv1Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-AccessKey
Section titled “-AccessKey”Access Key from your API credential acquired from the LM Portal
Type: StringParameter Sets: LMv1Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-BearerToken
Section titled “-BearerToken”Bearer token from your API credential acquired from the LM Portal. For use in place of LMv1 token
Type: StringParameter Sets: BearerAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-AccountName
Section titled “-AccountName”The subdomain for your LM portal, the name before “.logicmonitor.com” (subdomain.logicmonitor.com)
Type: StringParameter Sets: LMv1, Bearer, SessionSyncAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-UseCachedCredential
Section titled “-UseCachedCredential”This will list all cached account for you to pick from. This parameter is optional
Type: SwitchParameterParameter Sets: CachedAliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-CachedAccountName
Section titled “-CachedAccountName”Name of cached account you wish to connect to. This parameter is optional and can be used in place of UseCachedCredential
Type: StringParameter Sets: CachedAliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-SessionSync
Section titled “-SessionSync”Use session sync capability instead of api key
Type: SwitchParameterParameter Sets: SessionSyncAliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-DisableConsoleLogging
Section titled “-DisableConsoleLogging”Disables on info messages from displaying for any subsequent commands are run. Useful when building scripted logicmodules and you want to suppress unwanted output. Console logging is enabled by default.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-AutoUpdateModuleVersion
Section titled “-AutoUpdateModuleVersion”Automatically update the Logic.Monitor module to the latest version if available
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-SkipVersionCheck
Section titled “-SkipVersionCheck”Skip checking for newer versions of the Logic.Monitor module
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-GovCloud
Section titled “-GovCloud”Connect using the LM GovCloud portal
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-SkipCredValidation
Section titled “-SkipCredValidation”Skip validation of credentials, useful when connecting to a portal that is not yet configured with the Logic.Monitor module
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept 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. This command does not return any output.
Section titled “None. This command does not return any output.”You must run this command before you will be able to execute other commands included with the Logic.Monitor module.