Skip to content

Connect-LMAccount

Syntax

Lmv1 (Default)

Terminal window
Connect-LMAccount -AccessId <String> -AccessKey <String> -AccountName <String> [-DisableConsoleLogging]
[-AutoUpdateModuleVersion] [-SkipVersionCheck] [-SkipCredValidation] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

Bearer

Terminal window
Connect-LMAccount -BearerToken <String> -AccountName <String> [-DisableConsoleLogging]
[-AutoUpdateModuleVersion] [-SkipVersionCheck] [-SkipCredValidation] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

SessionSync

Terminal window
Connect-LMAccount -AccountName <String> [-SessionSync] [-DisableConsoleLogging] [-AutoUpdateModuleVersion]
[-SkipVersionCheck] [-SkipCredValidation] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Cached

Terminal window
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

Terminal window
#Connecting to an Account using an Access ID and Access Key
Connect-LMAccount -AccessId xxxxxx -AccessKey xxxxxx -AccountName subdomain

Example 2

Terminal window
#Connecting to an Account using a Bearer Token
Connect-LMAccount -BearerToken xxxxxx -AccountName subdomain

Example 3

Terminal window
#Connecting to an Account using a Cached Credential
Connect-LMAccount -UseCachedCredential -CachedAccountName "CachedAccountName"

Parameters

-AccessId

Access ID from your API credential acquired from the LM Portal

Type: String
Parameter Sets: LMv1
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AccessKey

Access Key from your API credential acquired from the LM Portal

Type: String
Parameter Sets: LMv1
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BearerToken

Bearer token from your API credential acquired from the LM Portal. For use in place of LMv1 token

Type: String
Parameter Sets: Bearer
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AccountName

The subdomain for your LM portal, the name before “.logicmonitor.com” (subdomain.logicmonitor.com)

Type: String
Parameter Sets: LMv1, Bearer, SessionSync
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseCachedCredential

This will list all cached account for you to pick from. This parameter is optional

Type: SwitchParameter
Parameter Sets: Cached
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept 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: String
Parameter Sets: Cached
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionSync

Use session sync capability instead of api key

Type: SwitchParameter
Parameter Sets: SessionSync
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept 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: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-AutoUpdateModuleVersion

Fill AutoUpdateModuleVersion Description

Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-SkipVersionCheck

Fill SkipVersionCheck Description

Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-SkipCredValidation

Fill SkipCredValidation Description

Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Fill ProgressAction Description

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept 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.