dazzler1971
asked on
Extract to spreadsheet users and login scripts
Hi,
We have inhertited an NT4 network with 250 users and im trying to find out which login script each users uses without having to manually open their account up and look. Do you know of a utility that will export each user to perhaps a .csv file with the associated login script they are using.
This would save me loads of time
Many thanks in advance
Daz
We have inhertited an NT4 network with 250 users and im trying to find out which login script each users uses without having to manually open their account up and look. Do you know of a utility that will export each user to perhaps a .csv file with the associated login script they are using.
This would save me loads of time
Many thanks in advance
Daz
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Set objDomain = GetObject("WinNT://fabrika
objDomain.Filter = Array("User")
For Each objUser In objDomain
WScript.Echo "Name, " & objUser.Name & " ,"
WScript.Echo "Fullname, " & objUser.Fullname & " ,"
WScript.Echo "Description, " & objUser.Description & " ,"
WScript.Echo "AccountDisabled, " & objUser.AccountDisabled & " ,"
WScript.Echo "IsAccountLocked, " & objUser.IsAccountLocked & " ,"
WScript.Echo "Profile, " & objUser.Profile & " ,"
WScript.Echo "LoginScript, " & objUser.LoginScript & " ,"
WScript.Echo "HomeDirectory, " & objUser.HomeDirectory & " ,"
Next
I added Comma's after the descriptions and after each entry that will be returned so in effect it's a csv format. Copy the above into a text file, save it, rename the txt extension to vbs and your all set. I tested this and it works very well!
You may also try the same with this: http://www.activexperts.com/activmonitor/windowsmanagement/adsi/samples/
Sub ListUsers( strDomain )
Set objComputer = GetObject("WinNT://" & strDomain )
objComputer.Filter = Array( "User" )
For Each objUser In objComputer
WScript.Echo "Name, " & objUser.Name & " ,"
WScript.Echo "Fullname, " & objUser.Fullname & " ,"
WScript.Echo "Description, " & objUser.Description & " ,"
WScript.Echo "AccountDisabled, " & objUser.AccountDisabled & " ,"
WScript.Echo "IsAccountLocked, " & objUser.IsAccountLocked & " ,"
WScript.Echo "Profile, " & objUser.Profile & " ,"
WScript.Echo "LoginScript, " & objUser.LoginScript & " ,"
WScript.Echo "HomeDirectory, " & objUser.HomeDirectory & " ,"
WScript.Echo " ,"
Next
End Sub
Dim strDomain
Do
strDomain = inputbox( "Please enter a domainname", "Input" )
Loop until strDomain <> ""
ListUsers( strDomain )
It will prompt you to enter your domain!
-rich