Remove-SCRunAsAccount

Removes a Run As account.

Description

The Remove-SCRunAsAccount cmdlet removes a Run As account from System Center Virtual Machine Manager (VMM).

For more information about Remove-SCRunAsAccount, type: "Get-Help Remove-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.

JobVariable

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

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. 

VMMServer

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

Examples

1. Remove a Run As account
PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> Remove-SCRunAsAccount -RunAsAccount $RunAsAccount
The first command gets the Run As account object named RunAsAccount01 and stores the object in the $RunAsAccount variable.

The second command removes the Run As account stored in $RunAsAccount.
2: Remove a Run As account using the pipeline operator.
PS C:\> Get-SCRunAsAccount -Name "RunAsAccount02" | Remove-SCRunAsAccount
This command gets the Run As account object named RunAsAccount02 and uses the pipeline operator to pass the object to the Remove-SCRunAsAccount cmdlet which removes the account.

See Also