Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Get-SCRunAsAccount

Updated: September 27, 2012

Applies To: System Center 2012 - Virtual Machine Manager

Get-SCRunAsAccount

Gets a list of Run As accounts.

Syntax

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




Detailed Description

The Get-SCRunAsAccount cmdlet gets a list of System Center Virtual Machine Manager (VMM) Run As accounts.

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

Parameters

-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

1: Get a Run As account by its name.

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

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


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

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

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

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


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

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 stores the objects in the $RunAsAccount array.

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


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

Related topics

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.