How ca I view the GUID associated with an Active Directory user under windows 7?
6 Answers
This is easy to do using Active Directory Users and Computers
.
Click View
> Advanced Features
(to be able to see Attribute Editor
tab later)
Drill down to the user you want to know about and open the Properties
.
Click the Attribute Editor
tab
Scroll down to the "ObjectSID" or "ObjectGUID" attributes.
Profit.
Open powershell.
Type: get-aduser -identity <insert username here>
The ObjectGUID
will appear in the output
-
1Depending on the operating system version, you will have to install "Remote Server Administration Tools (RSAT) for Windows" to get the command. Some other answers give the way to get the
SID
and not theObjectGUID
. A link to get the difference: docs.microsoft.com/en-us/windows/security/identity-protection/…– PhilippeApr 7, 2021 at 8:17
I would use the ADSI Edit snap-in for the Microsoft Management Console. See Using ADSI Edit on WIN-7.
The GUID is in an Active Directory attribute called objectguid.
c:\windows\system32\LDP.exe
Connection -> Bind -> OK
Browse -> Search
Base DN : (this varies per environment)
Fitler: (samAccountName=yourAccountName)
Scope: Subtree (this does nested search)
Attributes : add "objectGUID"
...
That should do it.
In PowerShell type the following commands:
Get-ADUser -Filter * -Properties SID | where {$_.sid -eq 'number here'}
Get-ADComputer -Filter * -Properties SID | where {$_.sid -eq 'number here'}