Skip to content

Remove-LMAPIToken

Terminal window
Remove-LMAPIToken -UserId <int> -APITokenId <int> [-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
Remove-LMAPIToken -UserName <string> -APITokenId <int> [-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
Remove-LMAPIToken -AccessId <string> [-WhatIf] [-Confirm] [<CommonParameters>]

The Remove-LMAPIToken function is used to remove an API token from Logic Monitor. It supports removing the token by specifying either the token’s ID, the user’s ID and token’s ID, or the user’s name and token’s ID.

Terminal window
Remove-LMAPIToken -UserId 1234 -APITokenId 5678

Removes the API token with ID 5678 associated with the user with ID 1234.

Terminal window
Remove-LMAPIToken -UserName "john.doe" -APITokenId 5678

Removes the API token with ID 5678 associated with the user with name “john.doe”.

Terminal window
Remove-LMAPIToken -AccessId "abcd1234"

Removes the API token with the specified access ID.

The access ID of the API token. This parameter is mandatory when using the ‘AccessId’ parameter set.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: AccessId
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

The ID of the API token. This parameter is mandatory when using the ‘Id’ or ‘Name’ parameter set.

Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Name
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
- Name: Id
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

The ID of the user associated with the API token. This parameter is mandatory when using the ‘Id’ parameter set.

Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Id
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

The name of the user associated with the API token. This parameter is mandatory when using the ‘Name’ parameter set.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Name
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

Runs the command in a mode that only reports what would happen without performing the actions.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

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.