Sponsored Links

Login Form






Lost Password?

Syndicate

Home
Find Users SID PDF Print E-mail
User Rating: / 1
PoorBest 
Written by Cheyenne Harden   
I was looking through the registry of a terminal server for a users outlook profille info.
The only problem was, all users are referred to by an SID.
I did some searching on the Internet and found this answer.
This script will allow you to pull a users SID and display it in a message box.

----------COPY EVERYTHING BELOW THIS LINE----------

'This script will allow you to pull a users SID and display it in a message box.
'Created by C.E. Harden September 28 2006

sUser = InputBox("Type in the name of the user you want to query.")
sDomain = "matrixsvr"

Set oUserAccount = GetObject("winmgmts://./root/cimv2") _
    .Get("Win32_UserAccount.Domain='" & sDomain & "'" _
    & ",Name='" & sUser & "'")

sUserSID = oUserAccount.SID
WScript.Echo sUser & "'s" &" SID: " & sUserSID


----------COPY EVERYTHING ABOVE THIS LINE----------

PLEASE MAKE SURE NO WORD WRAPPING IS HAPPENING IN YOUR SCRIPT!!!

To make this script work you will need two things!


1. You will need the users login name.
2. You will need to be an Admin.

This information is provided "AS IS" with no warranties expressed or implied.

Comments
Add NewSearch
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
 
Security Image
Please input the anti-spam code that you can read in the image.

Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved.

 
Tag it:
Delicious
Furl it!
Spurl
digg
YahooMyWeb
< Prev   Next >
 

Google Search

Google