Set-SCRunAsAccount

Modifies the properties of a Run As account.

Description

The Set-SCRunAsAccount cmdlet modifies the properties of a System Center Virtual Machine Manager (VMM) Run As account.

For more information about Set-SCRunAsAccount, type: "Get-Help Set-SCRunAsAccount -online".

Parameters

RunAsAccount

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a Run As account that contains credentials with permission to perform this action.

Credential

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of Restart-SCJob, has permission to complete a restarted task. 

For more information about the PSCredential object, type: "Get-Help Get-Credential". 
For more information about Run As accounts, type: "Get-Help New-SCRunAsAccount".

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

Name

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

NoValidation

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the Run As account will not validate the provided domain credentials.

Owner

Required? false
Accept Pipeline Input? false
Position? named
Specifies the owner of a VMM object in the form of a valid domain user account.

Example format: -Owner "Contoso\ReneeLo"
Example format: -Owner "ReneeLo@Contoso"

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

UserRole

Required? false
Accept Pipeline Input? false
Position? named
Specifies a user role object.

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Examples

1: Change the name of an existing Run As account.
PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "RunAsAccount01" 
PS C:\> Set-SCRunAsAccount -RunAsAccount $RunAsAccount -Name "New Run As Account Name" -Description "This is an administrator account for accessing Hyper-V hosts."

The first command gets the Run As account object named RunAsAccount01 and stores the object in the $RunAsAccount variable.

The second command changes the name of the Run As account stored in $RunAsAccount to "New Run As Account Name" and adds a description for the account.

See Also