New-LMAPIUser
Syntax
Section titled “Syntax”New-LMAPIUser [-Username] <String> [[-UserGroups] <String[]>] [[-Note] <String>] [[-RoleNames] <String[]>] [[-Status] <String>] [-ProgressAction <ActionPreference>] [-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”-Username
Section titled “-Username”The username for the new API user. This parameter is mandatory.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-UserGroups
Section titled “-UserGroups”The user groups to add the new user to.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: 2Default value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseA note describing the purpose of the API user.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 3Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-RoleNames
Section titled “-RoleNames”The roles to assign to the user. Defaults to “readonly”.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: 4Default value: @("readonly")Accept pipeline input: FalseAccept wildcard characters: False-Status
Section titled “-Status”The status of the user. Valid values are “active” and “suspended”. Defaults to “active”.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 5Default value: ActiveAccept pipeline input: FalseAccept wildcard characters: False-WhatIf
Section titled “-WhatIf”Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameterParameter Sets: (All)Aliases: wi
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: SwitchParameterParameter Sets: (All)Aliases: cf
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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
Section titled “Inputs”None. You cannot pipe objects to this command.
Section titled “None. You cannot pipe objects to this command.”Outputs
Section titled “Outputs”Returns the created user object.
Section titled “Returns the created user object.”You must run Connect-LMAccount before running this command.