New-LMUser
Syntax
Section titled “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>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”The New-LMUser function creates a new user in LogicMonitor with the specified parameters.
Examples
Section titled “Examples”Example 1
Section titled “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
Section titled “Parameters”-Username
Section titled “-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: FalseThe 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
Section titled “-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
Section titled “-Password”The password for the new user.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 4Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-UserGroups
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-Phone”The phone number of the new user.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 9Default value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseA note or description for the new user.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 10Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-RoleNames
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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-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 LogicMonitor.User object.
Section titled “Returns LogicMonitor.User object.”You must run Connect-LMAccount before running this command.