Showing results for November 2004 - Page 2 of 4 - Scripting Blog [archived]

Nov 19, 2004
0
0

How Can I Put New Users in the Same OU as the Person Creating Their Accounts?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! We use a script to create user accounts. How can I modify this script so that it will place the new user in the same OU as the person running the script?-- CB Hey, CB. Interesting question. We’re assuming that you’ve delegated control of Active Directory. User A, for example, has the right to create users in the Finance OU, b...

Scripting Guy!scripting techniquesVBScript
Nov 18, 2004
0
0

Can I Use a Script to Determine the Size of a Folder on a Remote Computer?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Can I use a script to determine the size of a folder on a remote computer?-- SS Hey, SS. Boy, you’d think you’d be able to do that, wouldn’t you? Especially if you’ve glanced through the WMI class Win32_Directory and noticed the property FileSize. Based on that, you might think, “Well, obviously I could just write a WMI scrip...

Scripting Guy!VBScriptstorage
Nov 17, 2004
0
0

Hey, Scripting Guy! Is There Any Way to Determine the Default Printer On a Computer?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Is there any way to determine the default printer on a computer?-- JW Hey, JW. If you’re running Windows XP or Windows Server 2003, determining the default printer is easy. That’s because the WMI class Win32_Printer found on these versions of Windows includes a property named Default. As the name implies, this property tells ...

Scripting Guy!VBScriptprinting
Nov 16, 2004
0
0

Can I Read an Entire Text File Rather Than Reading It Line-by-Line?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Right now I use a script to open a text file containing computer names. The script reads the first line of the file and connects to that computer, then reads the second line of the file and connects to that computer. Is there a way to store those names in a variable or something, so that I don’t have to keep reading the text f...

Scripting Guy!scripting techniquesVBScript
Nov 15, 2004
0
0

Can I Lock a Workstation Using a Script?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I know how I can shut down a computer using a script, and I even know how I can log a user off using a script. But is there any way I can lock a workstation using a script?-- TO-R Hey, TO-R. Most likely you’re familiar with the Win32Shutdown method found in the WMI class Win32_OperatingSystem; that method allows you to shutdo...

Scripting Guy!VBScriptdesktop management