| external help file | ConnectWiseControlAPI-help.xml |
|---|---|
| Module Name | ConnectWiseControlAPI |
| online version | https://github.com/christaylorcodes/ConnectWiseControlAPI |
| schema | 2.0.0 |
Creates an internal user.
New-CWCUser [-Credentials] <PSCredential> [[-OTP] <String>] [[-DisplayName] <String>] [-Email] <String>
[[-SecurityGroups] <String[]>] [[-ForcePassChange] <Boolean>] [-WhatIf]
[-Confirm] [<CommonParameters>]
Calls SecurityService.SaveUser. The password is never written to verbose or debug output.
$Credentials = Get-Credential -UserName 'jdoe' -Message 'Password for the new user'
New-CWCUser -Credentials $Credentials -Email 'jdoe@example.com' -SecurityGroups 'Technicians'
Creates the user jdoe in the Technicians role. The user must change the password at first login.
$Mfa = New-CWCMFA -UserAccount 'jdoe'
New-CWCUser -Credentials $Credentials -OTP $Mfa.OTP -SecurityGroups 'Technicians' -ForcePassChange $false
Creates the user with an authenticator-app secret and without a forced password change.
User name and password of the new user.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
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: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseDisplay name.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseEmail address.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseRoles the user is a member of.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: @()
Accept pipeline input: False
Accept wildcard characters: FalseForce the user to change their password at next login. Defaults to $true.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: True
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