Connect-LMAccount
Syntax
Lmv1 (Default)
Connect-LMAccount -AccessId <String> -AccessKey <String> -AccountName <String> [-DisableConsoleLogging] [-AutoUpdateModuleVersion] [-SkipVersionCheck] [-SkipCredValidation] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Bearer
Connect-LMAccount -BearerToken <String> -AccountName <String> [-DisableConsoleLogging] [-AutoUpdateModuleVersion] [-SkipVersionCheck] [-SkipCredValidation] [-ProgressAction <ActionPreference>] [<CommonParameters>]
SessionSync
Connect-LMAccount -AccountName <String> [-SessionSync] [-DisableConsoleLogging] [-AutoUpdateModuleVersion] [-SkipVersionCheck] [-SkipCredValidation] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Cached
Connect-LMAccount [-UseCachedCredential] [-CachedAccountName <String>] [-DisableConsoleLogging] [-AutoUpdateModuleVersion] [-SkipVersionCheck] [-SkipCredValidation] [-ProgressAction <ActionPreference>] [<CommonParameters>]
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
Example 1
#Connecting to an Account using an Access ID and Access KeyConnect-LMAccount -AccessId xxxxxx -AccessKey xxxxxx -AccountName subdomain
Example 2
#Connecting to an Account using a Bearer TokenConnect-LMAccount -BearerToken xxxxxx -AccountName subdomain
Example 3
#Connecting to an Account using a Cached CredentialConnect-LMAccount -UseCachedCredential -CachedAccountName "CachedAccountName"
Parameters
-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
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
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
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
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
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
Use session sync capability instead of api key
Type: SwitchParameterParameter Sets: SessionSyncAliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False
-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
Fill AutoUpdateModuleVersion Description
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False
-SkipVersionCheck
Fill SkipVersionCheck Description
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False
-SkipCredValidation
Fill SkipCredValidation Description
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False
-ProgressAction
Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
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
None. You cannot pipe objects to this command.
Outputs
None. This command does not return any output.
Notes
You must run this command before you will be able to execute other commands included with the Logic.Monitor module.