Hey!
I have a script that lists all users in our AD and looks for who has a homedrive on a specific server and then lists it.
The problem is that we have 5 major OU:s and I don't want to search more than one of them. How can I make this work better and quicker since now it takes about 1 hour (yeah, we have a LOT of objects).
Even if you could make it more smoother and just search by user it would be nice.
Here is the script today
strServer = InputBox("What resource server:","Resource Server")
Set oGroup = GetObject("WinNT://myCompany")
strUSers = strDomain & "\" & strGroup & vbNewLine
for each member in oGroup
If Instr(member.Homedirectory,strServer) Then WScript.Echo member.FullName
next
Thanks
Daniel
I have a script that lists all users in our AD and looks for who has a homedrive on a specific server and then lists it.
The problem is that we have 5 major OU:s and I don't want to search more than one of them. How can I make this work better and quicker since now it takes about 1 hour (yeah, we have a LOT of objects).
Even if you could make it more smoother and just search by user it would be nice.
Here is the script today
strServer = InputBox("What resource server:","Resource Server")
Set oGroup = GetObject("WinNT://myCompany")
strUSers = strDomain & "\" & strGroup & vbNewLine
for each member in oGroup
If Instr(member.Homedirectory,strServer) Then WScript.Echo member.FullName
next
Thanks
Daniel