| external help file | ConnectWiseControlAPI-help.xml |
|---|---|
| Module Name | ConnectWiseControlAPI |
| online version | https://github.com/christaylorcodes/ConnectWiseControlAPI |
| schema | 2.0.0 |
Updates an internal user.
Update-CWCUser [-UserToUpdate] <String> [[-NewUserName] <String>] [[-Password] <SecureString>]
[[-OTP] <String>] [[-DisplayName] <String>] [[-Email] <String>] [[-SecurityGroups] <String[]>]
[[-ForcePassChange] <Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>]
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.
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.
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: FalseNew user name.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseNew password.
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe 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: FalseNew display name.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseNew email address.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseRoles 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: FalseForce 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: FalseShows 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: FalsePrompts 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: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Author: Chris Taylor