Skip to content

Set-LMUser

Syntax

Id (Default)

Terminal window
Set-LMUser -Id <String> [-NewUsername <String>] [-Email <String>] [-UserGroups <String[]>]
[-AcceptEULA <Boolean>] [-Password <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>]

Username

Terminal window
Set-LMUser -Username <String> [-NewUsername <String>] [-Email <String>] [-UserGroups <String[]>]
[-AcceptEULA <Boolean>] [-Password <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 Set-LMUser function modifies an existing user in LogicMonitor, including their roles, permissions, and settings.

Examples

Example 1

Terminal window
Set-LMUser -Id 123 -NewUsername "newuser" -Email "user@domain.com" -Status "active"
Updates the user with new username, email, and status.

Parameters

-Id

Specifies the ID of the user to modify.

Type: String
Parameter Sets: Id
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Username

Specifies the current username.

Type: String
Parameter Sets: Username
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewUsername

Specifies the new username.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Email

Specifies the email address for the user.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserGroups

Specifies an array of user group names to assign to the user.

Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AcceptEULA

Indicates whether the user has accepted the EULA.

Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password

Specifies the new password for the user.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FirstName

Specifies the user’s first name.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LastName

Specifies the user’s last name.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForcePasswordChange

Indicates whether to force the user to change their password at next login.

Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Phone

Specifies the user’s phone number.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Note

Specifies a note for the user.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RoleNames

Specifies an array of role names to assign to the user.

Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SmsEmail

Fill SmsEmail Description

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SmsEmailFormat

Fill SmsEmailFormat Description

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Status

Specifies the user’s status. Valid values: “active”, “suspended”.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Timezone

Fill Timezone Description

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TwoFAEnabled

Fill TwoFAEnabled Description

Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Views

Specifies the views the user has access to. Valid values: “Alerts”, “Dashboards”, “Logs”, “Maps”, “Reports”, “Resources”, “Settings”, “Websites”, “All”.

Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Fill ProgressAction Description

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept 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.

Outputs

Returns a LogicMonitor.User object containing the updated user configuration.

Notes

This function requires a valid LogicMonitor API authentication.