Get-SCRunAsAccountConsumer
Gets the Run As account consumer objects for a specified Run As account.
Syntax
Get-SCRunAsAccountConsumer
[-VMMServer <ServerConnection>]
[[-RunAsAccount] <RunAsAccount>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
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.
Examples
Example 1: Get the load balancers that use a specified Run As account
PS C:\> $RunAsAcct = Get-SCRunAsAccount -Name "LBRunAsAcct01"
PS C:\> $RAAConsumers = Get-SCRunAsAccountConsumer -RunAsAccount $RunAsAcct
PS C:\> $RAAConsumers
The first command gets the Run As account object named LBRunAsAcct01 and 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 stores the consumer objects in the $RAAConsumers variable.
The last command displays the Run As account consumer objects stored in $RAAConsumers to the user.
Parameters
-OnBehalfOfUser
Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMMServer
Specifies a VMM server object.
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |