During my sessions at Techmentor Orlando 2007 on automating with batch files, a few of my samples used the CHOICE command. I never had time to fully explain it, hence the purpose of this entry. CHOICE, when used in a batch file gives you the ability to prompt the user to make, what else, a choice.
Category: Batch/CMD
Group Membership with DSQuery/DSGet
Recently I was helping out in a scripting forum. The topic was getting a report of all groups and their members. I have several VBScripts to do this, but an even easier and faster way is to use the DSQuery and DSGet commands from the command line. Want to see all the groups in your domain or forest simply run…
Philosophy Of Automation
Last month Jeffrey Snover had an excellent post on his Philosophy of Automation. I’d like to add my 2 cents to the discussion. This is a concept I’ve espoused my entire career. I’m always looking for ways to get more done faster with less. I expect many of you are interested in this as well or you wouldn’t be here.
Write Scripts – Win Prizes! Including a pass to TechEd 2007!
ScriptingAnswers.com and SAPIEN Technologies announce the ScriptingAnswers.com Automation Challenge 2007! This is your chance to submit your Windows administrative scripts – in any Windows-based scripting language – and win some great prizes.
All your script needs to do is accomplish some Windows administrative task. Our contest page at www.ScriptingAnswers.com/contest.asp includes some tips for writing the best script possible (one sure …
Blog Followups and Comments
We truly appreciate all the comments and feedback you’ve been giving us on our blog entries. We’ve tried to respond to comments in a timely manner. You are still welcome to leave comments. However, if you have a question that requires an answer or a problem trying something we’ve blogged about, we’re hoping you’ll post something in the forums at ScriptingAnswers.com.
Make an Old Friend Do Your Work
I’ve been revisiting an old friend from the days of DOS and ancient versions of Windows. I had forgotten how much work this friend did for me. The more I thought about it, and the more I caught up with this friend, the more I realized there is a entirely new generation of system administrators that have never met him.
Start Simple
Here’s another quick suggestion, especially for VBScript, that will make script development and debugging a little easier and a lot less stressful. It may seem like common sense, but sometimes we all just need a reminder: Start Simple.
More CLI and PowerShell
You don’t have to choose between the traditional command line interface (CLI) and PowerShell. You can easily run a PowerShell command or even a PowerShell script directly from a command prompt. This means you can integrate some PowerShell functionality into your older batch files. It also means that you can create a scheduled task to execute a PowerShell script!
Tip: CLI to PowerShell
If you have PowerShell installed (and if you don’t what are you waiting for?) you may be used to starting PowerShell from the Start Menu shortcut. But that’s not the only way.
Command Line One-Liners
I recently did a TipSheet column listing some of my favorite quick, one line commands. Reader Wayne was kind enough to share with me his list of oft-used one-liners which he graciously offered to share.