Get-SCRunAsAccountConsumer
Get-SCRunAsAccountConsumer
Gets the Run As account consumer objects for a specified Run As account.
Syntax
Parameter Set: Default
Get-SCRunAsAccountConsumer [[-RunAsAccount] <RunAsAccount> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Detailed Description
The Get-SCRunAsAccountConsumer cmdlet gets the Run As account consumer objects for a specified Run As account. Get-SCRunAsAccountConsumer returns any Virtual Machine Manager (VMM) object that refers to the given Run As account.
Parameters
-OnBehalfOfUser<System.String>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-OnBehalfOfUserRole<Microsoft.SystemCenter.VirtualMachineManager.UserRole>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RunAsAccount<RunAsAccount>
Specifies a Run As account that contains credentials with permission to perform this action.
Aliases |
none |
Required? |
false |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).
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.
Examples
Example Example 1.: Get the load balancers that use a specified Run As account.:
The first command gets the Run As account object named LBRunAsAcct01, and then stores the object in the $RunAsAcct variable.
The second command gets the Run As account consumer objects for the load balancers that use the Run As account stored in $RunAsAcct, and then stores the consumer objects in the $RAAConsumers variable.
The last command displays the Run As account consumer objects stored in $RAAConsumers.
PS C:\> $RunAsAcct = Get-SCRunAsAccount -Name "LBRunAsAcct01"
PS C:\> $RAAConsumers = Get-SCRunAsAccountConsumer -RunAsAccount $RunAsAcct
PS C:\> $RAAConsumers