Export (0) Print
Expand All
Expand Minimize

Get-SCRunAsAccount

Updated: April 29, 2014

Applies To: System Center 2012 R2 Virtual Machine Manager

Get-SCRunAsAccount

Gets VMM Run As accounts.

Syntax

Parameter Set: Default
Get-SCRunAsAccount [[-Name] <String> ] [-ID <Guid> ] [-IsEnabled <Boolean> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]




Detailed Description

The Get-SCRunAsAccount cmdlet gets Virtual Machine Manager (VMM) Run As accounts.

Parameters

-ID<Guid>

Specifies the numerical identifier as a globally unique identifier (GUID) for a specific object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IsEnabled<Boolean>

Retrieves, when set to $True, Run As accounts that are enabled. When set to $False, Run Accounts that are disabled are returned.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM object.


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • RunAsAccount
  • RunAsAccount[]

Examples

Example 1: Get a Run As account by its name

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

The second command displays information about the Run As account stored in $RunAsAccount.


PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> $RunAsAccount

Example 2: Get an enabled Run As account by its name

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

The second command displays information about the Run As account stored in $RunAsAccount.


PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "RunAsAccount01" -IsEnabled $True
PS C:\> $RunAsAccount

Example 3: Get enabled Run As accounts that contain a specified string in their name

The first command gets all enabled Run As account objects that contain Account in their names, and then stores the objects in the $RunAsAccount array.

The second command displays information about the first Run As account in the $RunAsAccount array. The third command displays information about the second Run As account in the $RunAsAccount array.


PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name *Account* -IsEnabled $True
PS C:\> $RunAsAccount[0]
PS C:\> $RunAsAccount[1] 

Related topics


New-SCRunAsAccount

Remove-SCRunAsAccount

Disable-SCRunAsAccount

Enable-SCRunAsAccount

Set-SCRunAsAccount

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft