Get-SCSMRunAsAccount

获取 RunAs 帐户。

语法

Get-SCSMRunAsAccount
   [[-Domain] <String>]
   [[-UserName] <String>]
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCSMRunAsAccount
   [-DisplayName] <String[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCSMRunAsAccount
   [-Id] <Guid[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCSMRunAsAccount
   [-Name] <String[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]

说明

Get-SCSMRunAsAccount cmdlet 检索 RunAs 帐户。 RunAs 帐户包含工作流运行所依据的用户凭据。 通过它们可以使 Service Manager 代表特定用户执行操作。 如果省略 Name 参数、 DisplayName 参数或 Domain 参数和 UserName 参数,则返回所有 RunAs 帐户。 NameDisplayName 参数支持通配符匹配。

示例

示例 1:从Service Manager获取 RunAs 帐户信息

PS C:\>Get-SCSMRunAsAccount
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...

此命令从Service Manager检索 RunAs 帐户信息。

参数

-ComputerName

指定要与之建立连接的计算机。 计算机必须运行 System Center Data Access 服务。 默认值是用于当前管理组连接的计算机。

有效格式包括 NetBIOS 名称、IP 地址或完全限定的域名 (FQDN)。 若要指定本地计算机,请键入该计算机名称、“localhost”或句点 (.)。

Type:System.String[]
Position:Named
Default value:Localhost
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

指定用于运行管理组连接的用户帐户。 如果指定了服务器,则帐户必须有权访问 ComputerName 参数中指定的服务器。 默认值为当前用户。

可以输入 Get-Credential cmdlet 返回的 PSCredential 对象。

Type:System.Management.Automation.PSCredential
Position:Named
Default value:User account of the current context
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

指定要检索的运行方式帐户配置文件名的显示名称。

Type:System.String[]
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Domain

指定要检索的运行方式帐户的域。

Type:System.String
Position:1
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Id

指定 RunAsAccount 对象的 SecureReference 属性的 ID。 这可能是 GUID 或将转换为 GUID 的字符串。

Type:System.Guid[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

指定要检索的 RunAs 帐户的名称。

Type:System.String[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-SCSession

指定与管理服务器的连接。 默认值是当前管理组连接。

输入由 Get-SCManagementGroupConnection cmdlet 返回的 ManagementGroupConnection 对象。

Type:Microsoft.SystemCenter.Core.Connection.Connection[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UserName

指定要用于 RunAs 帐户的用户名。

Type:System.String
Position:2
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

输入

System.Guid

可以将 RunAsAccount 的 GUID 传递给 Get-SCSMRunAsAccount cmdlet 的 ID 参数。

System.String

可以通过管道将 RunAsAccount 的名称传递给 Get-SCSMRunAsAccount cmdlet 的名称参数。

输出

Microsoft.EnterpriseManagement.Core.SdkUtilities.Security.UserAccount

封装与该运行方式帐户关联的运行方式帐户名和凭据的对象。