获取帮助显示不同系统上的不同输出



当我使用以下 cmdlet 时:

Get-Help Get-ADUser -Parameter identity

在安装了RSAT连接到Windows Server 2012 R2的Windows 7上,我得到以下输出:

-Identity <ADUser>
Specifies an Active Directory user object by providing one of the following property values. The identifier in
parentheses is the LDAP display name for the attribute.
Distinguished Name
Example:  CN=SaraDavis,CN=Europe,CN=Users,DC=corp,DC=contoso,DC=com
GUID (objectGUID)
Example: 599c3d2e-f72d-4d20-8a88-030d99495f20
Security Identifier (objectSid)
Example: S-1-5-21-3165297888-301567370-576410423-1103
SAM account name  (sAMAccountName)
Example: saradavis
The cmdlet searches the default naming context or partition to find the object. If two or more objects are found
the cmdlet returns a non-terminating error.
This parameter can also get this object through the pipeline or you can set this parameter to an object instance
This example shows how to set the parameter to a distinguished name.
-Identity  "CN=SaraDavis,CN=Europe,CN=Users,DC=corp,DC=contoso,DC=com"
This example shows how to set this parameter to a user object instance named "userInstance".
-Identity   $userInstance
Required?                    true
Position?                    1
Default value
Accept pipeline input?       true (ByValue)
Accept wildcard characters?  false

但是,当我在安装了WMF 5.1的Windows Server 2012 R2或2016上使用它时,我只能得到以下内容:

-Identity <ADUser>
Required?                    true
Position?                    1
Default value
Accept pipeline input?       true (ByValue)
Accept wildcard characters?  false

知道我做错了什么吗?

Get-ADUser命令来自一个"系统模块",即使具有相同版本的WMF,即使"Get-Command Get-ADUser"显示的版本号相同(1.0.0.0(...因此,帮助内容也可能有所不同。

顺便说一下,我在带有WMF 2012的Windows 2012 R5.1上得到了这个结果

-Identity <ADUser>
Specifies an Active Directory user object by providing one of the following property values. The identifier in
parentheses is the LDAP display name for the attribute. The acceptable values for this parameter are:
-- A Distinguished Name
-- A GUID (objectGUID)
-- A Security Identifier (objectSid)
-- A SAM Account Name (sAMAccountName)
The cmdlet searches the default naming context or partition to find the object. If two or more objects are found,
the cmdlet returns a non-terminating error.
This parameter can also get this object through the pipeline or you can set this parameter to an object instance.
Required?                    true
Position?                    1
Default value
Accept pipeline input?       True (ByValue)
Accept wildcard characters?  false

您可以尝试使用Update-Help下载最新的PowerShell帮助文件(如果您的服务器已连接到Internet...(。

最新更新