Yes. It will also include disabled users, just keep that in mind. It you need to eliminate all disabled users then I can help with that, but some admins delete old users while others make the accounts disabled. Let me know if you would like to filter out the disabled accounts.
Glad I could help.
This will list the users and there profile path out to a csv text file. Don't forget to replace "YourDomainHere" with your domain.
Set fso = CreateObject("Scripting.FileSystemObject")
set txtStream = fso.OpenTextFile("UserProfileList.csv", 2, True)
txtStream.WriteLine "Begin : " & date & " " &...
...is in the attribute msExchHomeServerName for each user object. This will enumerate the AD tree and return the name and Mailserver for each user.
'****************Setup ADSI connection and populate ADSI Collection************************************************
Set objADOconnADSI =...
Try adOpenStatic instead of adOpenKeyset as such maybe.
mySourceRecordset.Open "Select * from tbltempmkt", mySourceConn, adOpenStatic, adLockOptimistic
Good luck.
Here is a link to a script that does exactly what you are looking for.
http://cwashington.netreach.net/depo/view.asp?Index=1014&ScriptType=vbscript
Hope it helps.
When setting up the task schedular info in the run as box be sure to enter a username with appropriate rights. Also be sure to include the domain name for a domain account (ie.. "your_domain\johndoe") or if it is a local account that this should run under then (ie.. "computer_name\johndoe")
when setting
Set objTextFile = objFSO.OpenTextFile("C:Path\"&strComputer&".htm", ForWriting, True)
is the objTextFile simply a pointer and objFSO being set to the file?
If so then you are reseting the ojbFSO object when you are defining a new pointer to it and opening a different file when...
If IsExactMutilple= true Then
Response.Write("Enter the correct format")
End If
In the above if test you have typoed. You have IsExactMutilple but it should be IsExactMultiple.
The MOD will return null, 0, or the remainder I don't think it will return a true or false. Maybe try setting the following:
IsExactMultiple = (strToBeTested MOD intMultipleOf)
and then test as such:
if not isnull(IsExactMultiple) and IsExactMultiple <> 0 then
Response.Write("Enter the...
Sorry I had some errors on the early posted script. Here I have tested this one and maybe it will help. I included an if test to list only those ou's with the word "contractor" in it. I used the lcase to get around the case sensitive issues but this means that you must make your compare...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.