Skip to content

Latest commit

 

History

History
210 lines (163 loc) · 3.92 KB

Update-CWCUser.md

File metadata and controls

210 lines (163 loc) · 3.92 KB
external help file ConnectWiseControlAPI-help.xml
Module Name ConnectWiseControlAPI
online version https://github.com/christaylorcodes/ConnectWiseControlAPI
schema 2.0.0

Update-CWCUser

SYNOPSIS

Updates an internal user.

SYNTAX

Update-CWCUser [-UserToUpdate] <String> [[-NewUserName] <String>] [[-Password] <SecureString>]
 [[-OTP] <String>] [[-DisplayName] <String>] [[-Email] <String>] [[-SecurityGroups] <String[]>]
 [[-ForcePassChange] <Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Reads the user, applies the given changes and saves it (SecurityService.SaveUser). Parameters not given keep their current values, with one exception: "change password at next login" is switched off unless -ForcePassChange is given. The password is never written to verbose or debug output.

EXAMPLES

EXAMPLE 1

Update-CWCUser -UserToUpdate 'jdoe' -Password (Read-Host -AsSecureString) -ForcePassChange $True

Sets a new password for jdoe and makes them change it at the next login.

PARAMETERS

-UserToUpdate

User name of the account to update.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewUserName

New user name.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password

New password.

Type: SecureString
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OTP

The OTP key used for MFA. Can be generated with New-CWCMFA.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName

New display name.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Email

New email address.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecurityGroups

Roles the user should be a member of. Replaces the current list. An empty list is ignored, so this cannot remove every role.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForcePassChange

Force the user to change their password at next login. Without it the setting is switched off, even when it was on before.

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: 8
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

OUTPUTS

NOTES

Author: Chris Taylor

RELATED LINKS

https://github.com/christaylorcodes/ConnectWiseControlAPI