Showing results for August 2004 - Page 2 of 5 - Scripting Blog [archived]

Aug 24, 2004
0
0

Why Doesn't My Search Return All My User Accounts?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I’m trying to pull a list of all my users out of Active Directory. I’m using ADO to search for these users, but no matter what I do I can only get 1,000 user names, even though we probably have 10 times that many user accounts. What could I be doing wrong?-- MC, Athens, GA Hey, MC. Boy, if we had a nickel for every time we’ve b...

Scripting Guy!VBScriptActive Directory
Aug 23, 2004
0
0

Can I Change the Current Directory When Running a Script?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Can I change the current directory while my script is running?-- KO, Kalispell, MT Hey, KO. Yes, you can change the current directory while a script is running, provided you are running Windows Script Host 5.6, that is. To change the current directory, all you have to do is create an instance of the Wscript.Shell object, and th...

Scripting Guy!scripting techniquesVBScript
Aug 20, 2004
0
0

How Can I Determine Which Groups a User Belongs To?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! In my logon script, how can I find out which Active Directory groups a user belongs to? -- JB, Montpelier, VT Hey, JB. This is pretty easy to do in a logon script: So what’s going on here? Well, we begin by using the ADSystemInfo object to determine the distinguished name of the logged-on user; that will be a name similar to th...

Scripting Guy!scripting techniquesVBScript
Aug 19, 2004
0
0

How Can I Determine if a Folder Exists on a Computer?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Is there any way to determine whether or not a specific folder exists on a computer?-- RP, Umatilla, OR Hey, RP. There are a couple ways of doing this, depending on whether you are looking for the folder on the local computer or on a remote computer, and depending on whether or not you know the exact path to the folder. Let’s s...

Scripting Guy!VBScriptstorage
Aug 18, 2004
0
0

How Can I Determine How Long It Takes a Script to Run?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Is there a good way to time how long it takes for a script to run? -- BN, Montreal, Canada Hey, BN. Probably the easiest way to do this is to let the script time itself. To accomplish that feat, set the first line of the script to this: This code simply sets the value of the variable dtmStart to the current date and time. Now...

Scripting Guy!scripting techniquesVBScript