New-LMAPIUser
Syntax
Section titled “Syntax”__AllParameterSets
Section titled “__AllParameterSets”New-LMAPIUser [-Username] <string> [[-UserGroups] <string[]>] [[-Note] <string>] [[-RoleNames] <string[]>] [[-Status] <string>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”The New-LMAPIUser function creates a new API-only user in LogicMonitor with specified roles and group memberships.
Examples
Section titled “Examples”EXAMPLE 1
Section titled “EXAMPLE 1”#Create a new API userNew-LMAPIUser -Username "api.user" -UserGroups @("Group1","Group2") -RoleNames @("admin") -Note "API user for automation"Parameters
Section titled “Parameters”-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: ''A note describing the purpose of the API user.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 2 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-RoleNames
Section titled “-RoleNames”The roles to assign to the user. Defaults to “readonly”.
Type: System.String[]DefaultValue: '@("readonly")'SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 3 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Status
Section titled “-Status”The status of the user. Valid values are “active” and “suspended”. Defaults to “active”.
Type: System.StringDefaultValue: activeSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 4 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-UserGroups
Section titled “-UserGroups”The user groups to add the new user to.
Type: System.String[]DefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 1 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Username
Section titled “-Username”The username for the new API user. This parameter is mandatory.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 0 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.