Sign in
TechNet Blogs
Technet Blog Images
More ...
Blog - Title
August, 2004
TechNet Blogs
>
Hey, Scripting Guy! Blog
>
August, 2004
Server & Tools Blogs
>
Server & Management Blogs
>
Hey, Scripting Guy! Blog
All About Windows Server
Windows Server
Windows Server Essentials Blog
Building Clouds
Partner & Customer Solutions
Server & Cloud
Ask The
Performance Team
Ask Premier Field Engineering
Ask the Core Team
Cloud & Datacenter Management
The System Center Team Blog
System Center Virtual Machine Manager
System Center Service Manager
System Center Operations Manager
System Center Data Protection Manager
System Center Orchestrator
Partner & Customer Solutions
Client Management
System Center Configuration Manager
System Center Service Manager
MDOP
Malware Protection Center
Windows Intune
SUS
Partner and Customer Solutions
Virtualization, VDI & Remote Desktop
Virtualization Team Blog
Ben Armstrong’s Virtualization Blog
Jose Barreto Blog on Hyper-V
Partner & Customer Solutions
Remote Desktop Services
Windows Multipoint Server
Ask the Core Team on Hyper-V
File & Storage & High Availability
File & Storage
Jose Barreto
Partner & Customer Solutions
Ask the Core Team on Failover Cluster
Clustering & High Availability
Windows Server Management
PowerShell
Hey Scripting Guy (PowerShell)
Server Manager
Group Policy
Networking
Identity & Access
Ask Directory Services
Active Directory
Microsoft Leadership
Brad Anderson - In the Cloud
Hey, Scripting Guy! Blog
Learn about Windows PowerShell
Live Now on Server & Tools Blogs
Useful Links
Learn Powershell
TechNet Script Center Home page
Scripting Guys Script Repository
The Official Scripting Guys Scripting Forum
Subscribe
Comments
Contact
Menu
Blog Home
Atom
Translate this page
Powered by
Microsoft® Translator
Twitter Feed
Tags
2010 Scripting Games
2011 Scripting Games
2012 Scripting Games
Active Directory
Advanced
Beginner
databases
dates and times
desktop management
event logs
events and monitoring
Excel spreadsheet
files
folders
general management tasks
getting started
guest blogger
leaderboard
Logs and monitoring
Microsoft Excel
Microsoft Outlook
Microsoft Word
networking
Office
operating system
PowerShell 3
PowerTip
processes
Quick-Hits Friday
registry
running
Scripting Guy!
scripting techniques
Scripting Wife
Sean Kearney
searching Active Directory
security
servers
SQL Server
storage
string manipulation
text files
user accounts
using the Internet
VBScript
Web pages and HTAs
Weekend Scripter
Windows PowerShell
WMI
writing
More
▼
Less
▲
Related Resources
Script Center Home
Scripting Library
Learn to Script
Script Repository
Scripting Forum
2012 Scripting Games
Archives
Archives
May 2013
(50)
April 2013
(61)
March 2013
(62)
February 2013
(56)
January 2013
(62)
December 2012
(62)
November 2012
(68)
October 2012
(62)
September 2012
(62)
August 2012
(63)
July 2012
(32)
June 2012
(39)
May 2012
(33)
April 2012
(97)
March 2012
(44)
February 2012
(31)
January 2012
(31)
December 2011
(31)
November 2011
(30)
October 2011
(31)
September 2011
(30)
August 2011
(31)
July 2011
(31)
June 2011
(30)
May 2011
(31)
April 2011
(97)
March 2011
(41)
February 2011
(28)
January 2011
(31)
December 2010
(31)
November 2010
(30)
October 2010
(31)
September 2010
(30)
August 2010
(33)
July 2010
(31)
June 2010
(30)
May 2010
(67)
April 2010
(65)
March 2010
(34)
February 2010
(29)
January 2010
(23)
December 2009
(23)
November 2009
(22)
October 2009
(23)
September 2009
(22)
August 2009
(25)
July 2009
(24)
June 2009
(38)
May 2009
(22)
April 2009
(22)
March 2009
(22)
February 2009
(20)
January 2009
(22)
December 2008
(8)
November 2008
(17)
October 2008
(9)
September 2008
(8)
August 2008
(6)
July 2008
(5)
June 2008
(21)
May 2008
(21)
April 2008
(22)
March 2008
(21)
February 2008
(21)
January 2008
(22)
December 2007
(10)
November 2007
(20)
October 2007
(23)
September 2007
(19)
August 2007
(23)
July 2007
(21)
June 2007
(21)
May 2007
(22)
April 2007
(21)
March 2007
(22)
February 2007
(21)
January 2007
(21)
December 2006
(11)
November 2006
(20)
October 2006
(22)
September 2006
(20)
August 2006
(23)
July 2006
(20)
June 2006
(22)
May 2006
(22)
April 2006
(20)
March 2006
(23)
February 2006
(20)
January 2006
(21)
December 2005
(16)
November 2005
(20)
October 2005
(21)
September 2005
(21)
August 2005
(23)
July 2005
(20)
June 2005
(22)
May 2005
(21)
April 2005
(21)
March 2005
(22)
February 2005
(20)
January 2005
(21)
December 2004
(16)
November 2004
(20)
October 2004
(21)
September 2004
(21)
August 2004
(22)
More
▼
Less
▲
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Hey, Scripting Guy! Blog
How Can I Prompt a User for Input?
Posted
over 9 years ago
by
ScriptingGuy1
2
Comments
Hey, Scripting Guy! I need my script to prompt users to enter some information, like the name of the file they want to create. How do I do that? -- RW, Williamsport, PA Hey, BN. The simplest - and most foolproof - way to do this is to use an InputBox;...
Hey, Scripting Guy! Blog
How Can I Stop a Script Partway Through?
Posted
over 9 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! Is there a way to make a script stop itself if certain conditions aren’t met? Like say I’m going to copy files to a remote computer, but then the remote computer isn’t available. Can I write code that tells the script to just go ahead...
Hey, Scripting Guy! Blog
How Can I Determine the Day of the Week?
Posted
over 9 years ago
by
ScriptingGuy1
4
Comments
Hey, Scripting Guy! I have a script that does certain management tasks based on the day of the week. I know how get the date in a script, but how can I tell whether it’s a Monday or a Tuesday or whatever? -- CT, Tallahassee, FL Hey, CT. This...
Hey, Scripting Guy! Blog
Can I Change the Command Window Title When Running a Script?
Posted
over 9 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! When I run a batch file, I can use the Title command to change the caption of the command window. Can I change the caption of the command window from within a script? -- AA, Yokohama, Japan Hey, AA. Well, yes, as long as you’re...
Hey, Scripting Guy! Blog
Why am I Getting an Error when Trying to Determine an IP Address?
Posted
over 9 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! I’m trying to determine the IP address on a computer, but I keep getting a Type Mismatch error. Do you know why? -- AQ, Jacksonville, FL Hey, AQ. As a matter of fact, we do know why you’re getting a Type Mismatch error, and it’s...
Hey, Scripting Guy! Blog
Why Doesn't My Search Return All My User Accounts?
Posted
over 9 years ago
by
ScriptingGuy1
3
Comments
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...
Hey, Scripting Guy! Blog
Can I Change the Current Directory When Running a Script?
Posted
over 9 years ago
by
ScriptingGuy1
0
Comments
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...
Hey, Scripting Guy! Blog
How Can I Determine Which Groups a User Belongs To?
Posted
over 9 years ago
by
ScriptingGuy1
0
Comments
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: On Error Resume Next Set objADSysInfo = CreateObject("ADSystemInfo...
Hey, Scripting Guy! Blog
How Can I Determine if a Folder Exists on a Computer?
Posted
over 9 years ago
by
ScriptingGuy1
2
Comments
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...
Hey, Scripting Guy! Blog
How Can I Determine How Long It Takes a Script to Run?
Posted
over 9 years ago
by
ScriptingGuy1
1
Comments
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...
Hey, Scripting Guy! Blog
How Can I Save Output to a Text File?
Posted
over 9 years ago
by
ScriptingGuy1
7
Comments
Hey, Scripting Guy! Is there an easy way to save my script output to a text file rather than displaying it on screen? -- KP, Ogden, UT Hey, KP. If you always want your script to save data to a text file rather than display it on screen, then you’re...
Hey, Scripting Guy! Blog
How Can I Give a User a Yes/No Prompt?
Posted
over 9 years ago
by
ScriptingGuy1
8
Comments
Hey, Scripting Guy! I have a script which performs some file management tasks, and then should ask the user whether or not they want to delete a set of files. How do I ask a user a Yes or No question like this? -- SE, Casper, WY Hey, SE. There are...
Hey, Scripting Guy! Blog
Can I Copy Script Output to the Clipboard?
Posted
over 9 years ago
by
ScriptingGuy1
7
Comments
Hey, Scripting Guy! Is there any way to have my script output copied to the Clipboard? -- ZW, Marseilles, France Hey, ZW. Well, as long as you don’t mind crazy work-arounds then, yes, it’s actually pretty easy to copy script output to...
Hey, Scripting Guy! Blog
Can I Read a Text File From the Bottom Up?
Posted
over 9 years ago
by
ScriptingGuy1
1
Comments
Hey, Scripting Guy! I have a log file in which new data is appended to the bottom of the file; that means the most recent entries are at the end of the file. I’d like to be able to read the file starting with the last line and then ending with the...
Hey, Scripting Guy! Blog
Can I Get a List of All My User Accounts?
Posted
over 9 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! Is there any way to get a list of all the user accounts in Active Directory? -- CB, Fremont, CA Hey, CB. By far the quickest and easiest way to do this is to search Active Directory for all your user accounts. Here’s a sample script...
Hey, Scripting Guy! Blog
How Can I Call the Dir Command?
Posted
over 9 years ago
by
ScriptingGuy1
3
Comments
Hey, Scripting Guy! I’m trying to do something that seems pretty simple: call the dir command from a script. It doesn’t seem to work, though. How come? -- CR, Mexico City, Mexico Hey, CR. It appears from your mail that you’re trying to do a simple...
Hey, Scripting Guy! Blog
Can I Enable the Caps Lock Key?
Posted
over 9 years ago
by
ScriptingGuy1
1
Comments
Hey, Scripting Guy! I have a script where users enter some information in an Input box. The information needs to be entered in all-capital letters, so my instructions say, “Please make sure the Caps Lock key is on before entering the information.” They...
Hey, Scripting Guy! Blog
How Can I Use Long File Names as Parameters?
Posted
over 9 years ago
by
ScriptingGuy1
1
Comments
Hey, Scripting Guy! I’m trying to run a command-line tool from a script, but I need to pass it a long file name like C:\Documents and Settings\All Users\Desktop\logfile.txt . No matter how I try to pass that file name, however, my script blows up on me...
Hey, Scripting Guy! Blog
How Can I Determine if a User is a Local Administrator?
Posted
over 9 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! Some of the things we do in our logon scripts require the user to be a local administrator. How can the script tell if the user is a local admin or not? -- GM, Denver, CO Hey, GM. The best way to do that is to check the membership...
Hey, Scripting Guy! Blog
How Do I Change the Title of a Message Box?
Posted
over 9 years ago
by
ScriptingGuy1
1
Comments
Hey, Scripting Guy! Whenever I use a message box, the caption reads Windows Script Host . Is there any way to change that caption? -- TT, Reno, NV Hey, TT. To answer your question, no, not if you’re using Wscript.Echo; in that case, you’re stuck with...
Hey, Scripting Guy! Blog
How Can I Get Yesterday’s Date?
Posted
over 9 years ago
by
ScriptingGuy1
3
Comments
Hey, Scripting Guy! I’m writing a script, and I need to know yesterday’s date. I can use Date() to figure out today’s date, but how do I figure out yesterday’s date? -- SS Hey, SS. You’re right; it’s easy to determine today’s date using a script: dtmToday...
Hey, Scripting Guy! Blog
Registry Script Doesn't Work
Posted
over 9 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! I tried writing a script to read data from the registry, but I keep getting this error: Do you have any idea what's wrong? I'm running Windows XP Professional, Service Pack 1, and this is the code I'm using: Const HKEY_LOCAL_MACHINE...
Page 1 of 1 (22 items)