Enable-SCRunAsAccount

Enables a previously disabled Run As account.

Syntax

Enable-SCRunAsAccount -JobGroup <Guid> [-JobVariable <String>] [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-RunAsynchronously] [-VMMServer <ServerConnection>]
 [<CommonParameters>]
Enable-SCRunAsAccount [-RunAsAccount] <RunAsAccount> [-JobVariable <String>] [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-RunAsynchronously] [-VMMServer <ServerConnection>]
 [<CommonParameters>]

Description

The Enable-SCRunAsAccount cmdlet enables a Run As account in Virtual Machine Manager (VMM) that has been previously disabled using the Disable-SCRunAsAccount cmdlet.

Examples

Example 1: Enable a Run As account

PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> Enable-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 enables the Run As account stored in $RunAsAccount.

Parameters

-JobGroup

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.

Type:Guid
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUserRole

Specifies a user role. To obtain a user role, use the Get-SCUserRole cmdlet. This cmdlet operates on behalf of the user role that this parameter specifies.

Type:UserRole
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsAccount

Specifies a Run As account that contains credentials with permission to perform this action.

Type:RunAsAccount
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

RunAsAccount

This cmdlet returns a **RunAsAccount** object.