Share via


Get-SCRunAsAccount

Gets RunAs accounts.

Syntax

FromDomainUserName (Default)

Get-SCRunAsAccount
    [[-Domain] <String>]
    [[-UserName] <String>]
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromDisplayName

Get-SCRunAsAccount
    [-DisplayName] <String[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromId

Get-SCRunAsAccount
    [-Id] <Guid[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromName

Get-SCRunAsAccount
    [-Name] <String[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

Description

The Get-SCRunAsAccount cmdlet retrieves RunAs accounts. RunAs accounts contain the user credentials under which workflows run. They make it possible for Service Manager to act on behalf of a specific user. If the Name parameter, the DisplayName parameter, or the Domain parameter and the UserName parameter are omitted, all RunAs accounts are returned. The Name or DisplayName parameters support wildcard matching.

Examples

Example 1: Get the RunAs account information from Service Manager

PS C:\>Get-SCRunAsAccount
Domain       UserName    DisplayName                                     Description

------       --------    -----------                                     -----------

NT Authority LocalSystem Workflow Account                                All workflows run under this account. It mu...

                         Automatic Agent Management Account              This account will be used to automatically ...

                         Reserved                                        This profile is reserved and must not be used.

                         Default Action Account                          The default Health Service Action Account

                         Privileged Monitoring Account                   This profile is used for monitoring which c...

                         Reserved                                        This profile is reserved and must not be used.

                         Active Directory Based Agent Assignment Account Account used by AD based agent assignment m...

                         Validate Alert Subscription Account             Account used by the validate alert subscrip...

                         MPUpdate Action Account                         This account is used by the MPUpdate notifier

DOM          user     Test

NT Authority LocalSystem Operational Database Account                    This account is used to read and write info...

This command retrieves the RunAs account information from Service Manager.

Parameters

-ComputerName

Specifies a computer with which to establish a connection. The computer must be running the System Center Data Access service. The default value is the computer for the current management group connection.

Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name (FQDN). To specify the local computer, type the computer name, "localhost", or a dot (.).

Parameter properties

Type:

System.String[]

Default value:Localhost
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Credential

Specifies a user account under which the management group connection will run. The account must have access to the server that is specified in the ComputerName parameter, if the server is specified. The default value is the current user.

You can enter a PSCredential object that is returned by the Get-Credential cmdlet.

Parameter properties

Type:System.Management.Automation.PSCredential
Default value:User account of the current context
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisplayName

Specifies the display name of the RunAs account profile name to retrieve.

Parameter properties

Type:

System.String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromDisplayName
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Domain

Specifies the domain of the RunAs account to be retrieved.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromDomainUserName
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Id

Specifies the ID of the SecureReference property of the RunAsAccount object. This may be a GUID or a string that will be converted to a GUID.

Parameter properties

Type:

System.Guid[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromId
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of the RunAs account to retrieve.

Parameter properties

Type:

System.String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromName
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-SCSession

Specifies a connection to a management server. The default is the current management group connection.

Enter a ManagementGroupConnection object that is returned by the Get-SCManagementGroupConnection cmdlet.

Parameter properties

Type:

Microsoft.SystemCenter.Core.Connection.Connection[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UserName

Specifies the user name to use for the RunAs account.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromDomainUserName
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

System.Guid

You can pipe a GUID of a RunAsAccount to the Id parameter of the Get-SCRunAsAccount cmdlet.

System.String

You can pipe a name of a RunAsAccount to the Name parameter of the Get-SCRunAsAccount cmdlet.

Outputs

Microsoft.EnterpriseManagement.Core.SdkUtilities.Security.UserAccount

The object that encapsulates the RunAs account name and the credentials that are associated with that RunAs account.