Get-SCRunAsAccount

Get-SCRunAsAccount

Gets VMM Run As accounts.

構文

Parameter Set: Default
Get-SCRunAsAccount [[-Name] <String> ] [-ID <Guid]> ] [-IsEnabled <Boolean]> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

詳細説明

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

パラメーター

-ID<Guid]>

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

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Name<String>

Specifies the name of a VMM object.

エイリアス

none

必須?

false

位置は?

1

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-OnBehalfOfUser<System.String>

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-OnBehalfOfUserRole<Microsoft.SystemCenter.VirtualMachineManager.UserRole>

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • RunAsAccount
  • RunAsAccount[]

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] 

関連トピック

New-SCRunAsAccount

Remove-SCRunAsAccount

Disable-SCRunAsAccount

Enable-SCRunAsAccount

Set-SCRunAsAccount