Get-SCSMRunAsAccount

Get-SCSMRunAsAccount

Retrieves the RunAs accounts available in the Service Manager environment.

Syntax

Parameter Set: Default
Get-SCSMRunAsAccount [-ComputerName <String> ] [-Credential <PSCredential> ] [-RunAsProfileName <String[]> ] [ <CommonParameters>]

Detailed Description

Retrieves the RunAs accounts available in the Service Manager environment. RunAs accounts contain the user credentials under which workflows run. These accounts allow Service Manager to act on behalf of a specific user. If the RunAsProfileName parameter is omitted, all RunAs accounts are returned. If the RunAsProfileName parameter is specified, the specified value is interpreted as a regular expression. All RunAs accounts whose Name or Display Name property matches the regular expression are returned.

Parameters

-ComputerName<String>

Specifies the name of the computer on which the Service Manager SDK Service is running. The default value is "localhost". The user account that is defined in the Credential parameter must have access rights to the specified computer.

Aliases

none

Required?

false

Position?

named

Default Value

localhost

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies the credentials to use when you connect to the server on which the Service Manager SDK Service is running. The provided user account must have access to that server. The default value for this parameter is the user account of the current context.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsProfileName<String[]>

Specifies the RunAs account to retrieve. This parameter is interpreted as a regular expression.

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

Outputs

The output type is the type of the objects that the cmdlet emits.

  • RunAsAccount object

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

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This command retrieves RunAs account information from the Service Manager environment.

C:\PS>Get-SCSMRunAsAccount
PS> Get-SCSMRunAsAccount
RunAsProfileName                                  UserName
----------------                                  ----------
Domain Admin                                      WOODGROVE\Administrator
Automatic Agent Management Account
Reserved
Reserved
Privileged Monitoring Account
Active Directory Based Agent Assignment Account
Validate Alert Subscription Account
Operational Database Account
Microsoft.SystemCenter.PrimaryDeploymentAccount

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

This command retrieves RunAs account information from the Service Manager environment for the "Domain Admin" RunAs account.

C:\PS>Get-SCSMRunAsAccount -RunAsProfileName "Domain Admin"
PS> Get-SCSMRunAsAccount
RunAsProfileName                                  UserName
----------------                                  ----------
Domain Admin                                      WOODGROVE\Administrator

Getting Started with Service Manager Cmdlets for Windows PowerShell

Set-SCSMRunAsAccount