New-LMUser
Syntax
New-LMUser [-Username] <String> [-Email] <String> [[-AcceptEULA] <Boolean>] [[-Password] <String>] [[-UserGroups] <String[]>] [[-FirstName] <String>] [[-LastName] <String>] [[-ForcePasswordChange] <Boolean>] [[-Phone] <String>] [[-Note] <String>] [[-RoleNames] <String[]>] [[-SmsEmail] <String>] [[-SmsEmailFormat] <String>] [[-Status] <String>] [[-Timezone] <String>] [[-TwoFAEnabled] <Boolean>] [[-Views] <String[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
The New-LMUser function creates a new user in LogicMonitor with the specified parameters.
Examples
Example 1
New-LMUser -Username "john.doe" -Email "john.doe@example.com" -Password "P@ssw0rd" -RoleNames @("admin") -Views @("Dashboards", "Reports")
This example creates a new LogicMonitor user with the username “john.doe”, email “john.doe@example.com”, password “P@ssw0rd”, role “admin”, and access to the “Dashboards” and “Reports” views.
Parameters
-Username
The username of the new user. This parameter is mandatory.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
The email address of the new user. This parameter is mandatory.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 2Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-AcceptEULA
Specifies whether the user has accepted the End User License Agreement (EULA). The default value is $false.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: 3Default value: FalseAccept pipeline input: FalseAccept wildcard characters: False
-Password
The password for the new user.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 4Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-UserGroups
An array of user group names to which the new user should be added.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: 5Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-FirstName
The first name of the new user.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 6Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-LastName
The last name of the new user.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 7Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-ForcePasswordChange
Specifies whether the new user should be forced to change their password on first login. The default value is $true.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: 8Default value: TrueAccept pipeline input: FalseAccept wildcard characters: False
-Phone
The phone number of the new user.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 9Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Note
A note or description for the new user.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 10Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-RoleNames
An array of role names to assign to the new user. The default value is “readonly”.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: 11Default value: @("readonly")Accept pipeline input: FalseAccept wildcard characters: False
-SmsEmail
The SMS email address for the new user.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 12Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-SmsEmailFormat
The format of SMS emails for the new user. Valid values are “sms” and “fulltext”. The default value is “sms”.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 13Default value: SmsAccept pipeline input: FalseAccept wildcard characters: False
-Status
The status of the new user. Valid values are “active” and “suspended”. The default value is “active”.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 14Default value: ActiveAccept pipeline input: FalseAccept wildcard characters: False
-Timezone
The timezone for the new user. Valid values are listed in the function code.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 15Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-TwoFAEnabled
Specifies whether two-factor authentication (2FA) is enabled for the new user. The default value is $false.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: 16Default value: FalseAccept pipeline input: FalseAccept wildcard characters: False
-Views
An array of views that the new user should have access to. Valid values are listed in the function code.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: 17Default value: @("All")Accept pipeline input: FalseAccept wildcard characters: False
-ProgressAction
Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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
Returns LogicMonitor.User object.
Notes
You must run Connect-LMAccount before running this command.