| List Active Directory Objects SID |
|
|
|
| Written by Cheyenne Harden | |||||||||||||||||||||||||||||
|
Ok, I want to make things easy when looking for an object in the registry. I hate when their are a million SIDs and I have to search through a few to find what I am looking for. This script will allow you to pull all objects and their SID and write it to a text file. ----------COPY EVERYTHING BELOW THIS LINE---------- 'This script will list all objects in your domain along with their SIDs. On Error Resume Next Const ADS_SCOPE_SUBTREE = 2
strFile = "SID.txt" Set objFSO1 = CreateObject("Scripting.FileSystemObject") If objFSO1.FileExists(strWritePath) Then Else End If
Set objConnection = CreateObject("ADODB.Connection") Set objCOmmand.ActiveConnection = objConnection Do Until objRecordSet.EOF
sUserSID = oUserAccount.SID Set objFSO = CreateObject("Scripting.FileSystemObject") Do Until objTextFile.AtEndOfStream WScript.Echo "Task Completed!"
PLEASE MAKE SURE NO WORD WRAPPING IS HAPPENING IN YOUR SCRIPT!!! To make this script work you will need three things!
This information is provided "AS IS" with no warranties expressed or implied.
Powered by !JoomlaComment 3.12 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved. |
|||||||||||||||||||||||||||||
| < Prev | Next > |
|---|
















