Get-SCOMRunAsAccount

Get-SCOMRunAsAccount

Gets a Run As account for a management group.

Syntax

Parameter Set: EmptyParameterSet
Get-SCOMRunAsAccount [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromId
Get-SCOMRunAsAccount -Id <Guid[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromRunAsAccountName
Get-SCOMRunAsAccount [-Name] <String[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Detailed Description

The Get-SCOMRunAsAccount cmdlet gets Run As accounts for a System Center 2012 – Operations Manager management group. A Run As account gives users the ability to specify the necessary permissions for use with rules, tasks, monitors, and discoveries targeted to specific computers on an as-needed basis.

Parameters

-ComputerName<String[]>

Specifies an array of names of computers. The cmdlet establishes temporary connections with management groups for these computers. Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name (FQDN). To specify the local computer, specify the computer name, localhost, or a dot (.).

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies the user account under which the management group connection runs. Specify a PSCredential object, such as one that the Get-Credential cmdlet returns, for this parameter. For more information about credential objects, type Get-Help Get-Credential.

This account must have access to the server that is specified in the ComputerName parameter if that parameter appears.

If you do not specify this parameter, the default is the account for the current user.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Id<Guid[]>

Specifies an array of account IDs.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Name<String[]>

Specifies an array of account names that this cmdlet gets.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

true

-SCSession<Connection[]>

Specifies an array of Connection objects. To get Connection objects, use the Get-SCOMManagementGroupConnection cmdlet.

If this parameter does not appear, the cmdlet uses the active persistent connection to a management group. Use the SCSession parameter to specify a different persistent connection. You can create a temporary connection to a management group by using the ComputerName and Credential parameters. For more information, type Get-Help about_OpsMgr_Connections.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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 1: Get all action accounts

This command gets all action accounts.

PS C:\> Get-SCOMRunAsAccount

Example 2: Get all data warehouse accounts

This command gets all accounts whose names begin with Data Warehouse.

PS C:\> Get-SCOMRunAsAccount -Name "Data Warehouse*"

Add-SCOMRunAsAccount

Get-SCOMManagementGroupConnection

New-SCOMRunAsAccount

Remove-SCOMRunAsAccount

Update-SCOMRunAsAccount

Get-Credential