gpt4 book ai didi

powershell - Get-Help 显示不同系统上的不同输出

转载 作者:行者123 更新时间:2023-12-02 23:37:48 25 4
gpt4 key购买 nike

当我使用以下 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 5.1 的 Windows 2012 R2 上得到了这个结果

-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

你可以试试 更新帮助下载最新的 PowerShell 帮助文件(如果您的服务器连接到 Internet...)。

关于powershell - Get-Help 显示不同系统上的不同输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50856868/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com