Set-UnityUser

SYNOPSIS

Modifies local user parameters.

SYNTAX

Set-UnityUser [-session <Object>] [-ID] <Object[]> [-Role <String>] [-newPassword <String>]
 [-oldPassword <String>] [-WhatIf] [-Confirm]

DESCRIPTION

Modifies local user parameters. You need to have an active session with the array.

EXAMPLES

-------------------------- EXAMPLE 1 --------------------------

Set-UnityUser -Name 'User' -Role 'operator'

Gives the role 'operator' to the user 'User'

-------------------------- EXAMPLE 2 --------------------------

Get-UnityUSer -Name 'User' | Set-UnityUser -Role 'operator'

Gives the role 'operator' to the user 'User'. The user's information are provided by the Get-UnityUser through the pipeline.

PARAMETERS

-session

Specify an UnitySession Object.

Type: Object
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: ($global:DefaultUnitySession | where-object {$_.IsConnected -eq $true})
Accept pipeline input: False
Accept wildcard characters: False

-ID

User ID or Object.

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

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Role

User role. Might be: - administrator - storageadmin - vmadmin - operator

Type: String
Parameter Sets: (All)
Aliases: 

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

-newPassword

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

-oldPassword

Initial 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

-WhatIf

Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.

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

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

-Confirm

If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.

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

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

INPUTS

OUTPUTS

NOTES

Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE

https://github.com/equelin/Unity-Powershell