Get-SPManagedAccount

适用于: SharePoint Foundation 2010, SharePoint Server 2010

上一次修改主题: 2015-03-09

检索配置数据库中注册的帐户。

Syntax

Get-SPManagedAccount [[-Identity] <SPManagedAccountPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Service <SPServicePipeBind>]

Get-SPManagedAccount [[-Identity] <SPManagedAccountPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-WebApplication <SPWebApplicationPipeBind>]

Get-SPManagedAccount [[-Identity] <SPManagedAccountPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Server <SPServerPipeBind>]

详细说明

Get-SPManagedAccount cmdlet 加入到某个参数集中。它返回与给定范围匹配的管理帐户。该范围可以是下列任何值之一:Web 应用程序、服务****或服务器。

Parameters

参数 必需 类型 说明

Identity

可选

Microsoft.SharePoint.PowerShell.SPManagedAccountPipeBind

指定要检索的管理帐户的全名或部分名称。

该类型必须是有效帐户名称(格式为 Domain\User)或 GUID(格式为 1234-3456-09876)。

AssignmentCollection

可选

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

管理对象以便正确进行处理。使用 SPWebSPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。在使用 SPWebSPSiteSPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。

注意Note
在使用 Global 参数时,所有对象均包含在全局存储中。如果未立即使用对象,或未通过使用 Stop-SPAssignment 命令来处理对象,则可能会发生内存不足的情况。

Server

可选

Microsoft.SharePoint.PowerShell.SPServerPipeBind

将该范围指定为服务器。

Service

可选

Microsoft.SharePoint.PowerShell.SPServicePipeBind

将该范围指定为服务。

WebApplication

可选

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

将该范围指定为 Web 应用程序。

输入类型

返回类型

Example

--------------示例-----------------

Get-SPManagedAccount

此示例显示服务器场中的所有管理帐户。

See Also

Reference

New-SPManagedAccount
Set-SPManagedAccount
Remove-SPManagedAccount