Determining the SID for User Account

Determining the SID for a Local User Account

Here’s a simple script that returns the SID for a local user named mozaid:
https://gist.github.com/zaidmohd/2dd72d1ef0af76acd2ec556101a58ccc.js





Determining the SID for an Active Directory User Account

You can use the exact same approach to determine an Active Directory SID as you do for local user SID; the only thing is to include both the domain (fabrikam) and the user name (mozaid):

https://gist.github.com/zaidmohd/6110dc2fbf11a0054f305949dc9f7ea0.js


One thought on “Determining the SID for User Account

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s