New-LMUser
Syntax
Section titled “Syntax”__AllParameterSets
Section titled “__AllParameterSets”New-LMUser [-Username] <string> [-Email] <string> [[-AcceptEULA] <bool>] [[-Password] <string>] [[-UserGroups] <string[]>] [[-FirstName] <string>] [[-LastName] <string>] [[-ForcePasswordChange] <bool>] [[-Phone] <string>] [[-Note] <string>] [[-RoleNames] <string[]>] [[-SmsEmail] <string>] [[-SmsEmailFormat] <string>] [[-Status] <string>] [[-Timezone] <string>] [[-TwoFAEnabled] <bool>] [[-Views] <string[]>] [-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”-AcceptEULA
Section titled “-AcceptEULA”Specifies whether the user has accepted the End User License Agreement (EULA). The default value is $false.
Type: System.BooleanDefaultValue: FalseSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 2 IsRequired: false 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: ''The email address of the new user. This parameter is mandatory.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 1 IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-FirstName
Section titled “-FirstName”The first name of the new user.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 5 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-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: System.BooleanDefaultValue: TrueSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 7 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-LastName
Section titled “-LastName”The last name of the new user.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 6 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''A note or description for the new user.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 9 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Password
Section titled “-Password”The password for the new user.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 3 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Phone
Section titled “-Phone”The phone number of the new user.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 8 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-RoleNames
Section titled “-RoleNames”An array of role names to assign to the new user. The default value is “readonly”.
Type: System.String[]DefaultValue: '@("readonly")'SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 10 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-SmsEmail
Section titled “-SmsEmail”The SMS email address for the new user.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 11 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-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: System.StringDefaultValue: smsSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 12 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Status
Section titled “-Status”The status of the new user. Valid values are “active” and “suspended”. The default value is “active”.
Type: System.StringDefaultValue: activeSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 13 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Timezone
Section titled “-Timezone”The timezone for the new user. Valid values are listed in the function code.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 14 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-TwoFAEnabled
Section titled “-TwoFAEnabled”Specifies whether two-factor authentication (2FA) is enabled for the new user. The default value is $false.
Type: System.BooleanDefaultValue: FalseSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 15 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-UserGroups
Section titled “-UserGroups”An array of user group names to which the new user should be added.
Type: System.String[]DefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 4 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-Username
Section titled “-Username”The username of the new 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: ''-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: System.String[]DefaultValue: '@("All")'SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 16 IsRequired: false 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.