Reputation:
When I use the following cmdlet:
Get-Help Get-ADUser -Parameter identity
On Windows 7 with RSAT installed connecting to Windows Server 2012 R2, I get the following output:
-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
However when I use it on a Windows Server 2012 R2 or 2016 with WMF 5.1 installed I only get the following:
-Identity <ADUser>
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
Any idea what I'm doing wrong?
Upvotes: 2
Views: 39
Reputation: 307
Get-ADUser command comes from a 'system module' that can be different from an OS to an other even with the same version of WMF and even if the version number shown by 'Get-Command Get-ADUser' is the same (1.0.0.0) ... so help content may be different too.
By the way, I get this result on my Windows 2012 R2 with WMF 5.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
You may try Update-Help to download latest PowerShell help files (if your server is connected to Internet...).
Upvotes: 2