Get objectGUID and objectSid for Active Directory user

3

1

I can see what the objectGUID and objectSid are for a user, by going to: Active Directory Users and Computers -> The User -> Properties -> Attribute Editor, but it won't let me actually copy the values in string format! I can't even really copy the Hexadecimal value and convert it online since the hex characters are not given in order.

I've tried using ldp.exe but I can't get it to find the user.

Are there any other tricks to getting (and copying!) the objectGUID and objectSid of an Active Directory user?

pkr298

Posted 2015-08-24T22:27:52.567

Reputation: 1 247

Answers

6

Is PowerShell an option? If so you can do something along the following.

Get-ADUser USERNAME -Properties * | Select SamaccountName,ObjectSid,ObjectGUID

Unfundednut

Posted 2015-08-24T22:27:52.567

Reputation: 6 650

1Thanks, I used Get-ADUser USERNAME to get the information (splitting the Properties up cut off the ends of the values). – pkr298 – 2015-08-25T14:56:05.080

1You can generally do a | -select -expand SOMETHING and get the item alone. – Unfundednut – 2015-08-25T15:16:34.770

Thanks! is objectGUID different from objectId that is returned in the Get-MsolUser cmdlet? – asgs – 2017-04-10T15:32:49.577

1@asgs That looks like a 365 command which I don't have access to so can't help sorry. – Unfundednut – 2017-04-10T15:44:47.363

0

For all user user below powershell command and get it in csv

Get-ADUser -Filter * -SearchBase "OU=USA Users,DC=yourdomain,DC=net"  | Export-csv -path C:\usersproprieties.csv

SURYAKANT DAS

Posted 2015-08-24T22:27:52.567

Reputation: 101