Skip to content

New-LMCachedAccount

Syntax

Lmv1 (Default)

Terminal window
New-LMCachedAccount -AccessId <String> -AccessKey <String> -AccountName <String> [-CachedAccountName <String>]
[-OverwriteExisting <Boolean>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Bearer

Terminal window
New-LMCachedAccount -AccountName <String> -BearerToken <String> [-CachedAccountName <String>]
[-OverwriteExisting <Boolean>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

The New-LMCachedAccount function stores LogicMonitor portal credentials securely for use with Connect-LMAccount.

Examples

Example 1

Terminal window
#Cache LMv1 credentials
New-LMCachedAccount -AccessId "id123" -AccessKey "key456" -AccountName "company"

Example 2

Terminal window
#Cache Bearer token
New-LMCachedAccount -BearerToken "token123" -AccountName "company" -CachedAccountName "prod"

Parameters

-AccessId

The Access ID from your LogicMonitor API credentials.

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

-AccessKey

The Access Key from your LogicMonitor API credentials.

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

-AccountName

The portal subdomain (e.g., “company” for company.logicmonitor.com).

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

-BearerToken

The Bearer token for authentication (alternative to AccessId/AccessKey).

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

-CachedAccountName

The name to use for the cached account. Defaults to AccountName.

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

-OverwriteExisting

Whether to overwrite an existing cached account. Defaults to false.

Type: Boolean
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. Returns success message if account is cached successfully.

Notes

This command creates a secure vault to store credentials if one doesn’t exist.