Remove-LMAPIToken
Syntax
Section titled “Syntax”Id (Default)
Section titled “Id (Default)”Remove-LMAPIToken -UserId <int> -APITokenId <int> [-WhatIf] [-Confirm] [<CommonParameters>]Remove-LMAPIToken -UserName <string> -APITokenId <int> [-WhatIf] [-Confirm] [<CommonParameters>]AccessId
Section titled “AccessId”Remove-LMAPIToken -AccessId <string> [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”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.
Examples
Section titled “Examples”EXAMPLE 1
Section titled “EXAMPLE 1”Remove-LMAPIToken -UserId 1234 -APITokenId 5678Removes the API token with ID 5678 associated with the user with ID 1234.
EXAMPLE 2
Section titled “EXAMPLE 2”Remove-LMAPIToken -UserName "john.doe" -APITokenId 5678Removes the API token with ID 5678 associated with the user with name “john.doe”.
EXAMPLE 3
Section titled “EXAMPLE 3”Remove-LMAPIToken -AccessId "abcd1234"Removes the API token with the specified access ID.
Parameters
Section titled “Parameters”-AccessId
Section titled “-AccessId”The access ID of the API token. This parameter is mandatory when using the ‘AccessId’ parameter set.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: AccessId Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: true ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-APITokenId
Section titled “-APITokenId”The ID of the API token. This parameter is mandatory when using the ‘Id’ or ‘Name’ parameter set.
Type: System.Int32DefaultValue: 0SupportsWildcards: falseAliases: []ParameterSets:- Name: Name Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false- Name: Id Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- cfParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-UserId
Section titled “-UserId”The ID of the user associated with the API token. This parameter is mandatory when using the ‘Id’ parameter set.
Type: System.Int32DefaultValue: 0SupportsWildcards: falseAliases: []ParameterSets:- Name: Id Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-UserName
Section titled “-UserName”The name of the user associated with the API token. This parameter is mandatory when using the ‘Name’ parameter set.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: Name Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-WhatIf
Section titled “-WhatIf”Runs the command in a mode that only reports what would happen without performing the actions.
Type: System.Management.Automation.SwitchParameterDefaultValue: ''SupportsWildcards: falseAliases:- wiParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''CommonParameters
Section titled “CommonParameters”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.