Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Hey, Scripting Guy! How Can I Prompt Users for Information When a Script Is Run?

(image) Hey, Scripting Guy! I would like to have my script prompt the user for information when it is run. But I would like the person running the script to be able to supply more than one piece of information when the script is run. For example, I would like to provide information about hard drives on the computer, but I do not want to list ...

Hey, Scripting Guy! How Can I Use a Named Parameter When Running Scripts?

(image) Hey, Scripting Guy! I would like to be able to use a named parameter when running my scripts. There are a couple of reasons for this. The first is that I think that it looks cool to use a named parameter. The second reason is probably just as important as the first: I think it makes the script easier to use if I use a named parameter ...

Hey, Scripting Guy! How Can I Write and Run a Windows PowerShell Script?

(image) Hey, Scripting Guy! I appreciate the command-line stuff you are showing, but to be honest, I am not interested in returning to the DOS days to administer my network. I am not a UNIX administrator-I am a Windows guy. If I wanted to do UNIX kinds of things, I would download the latest *nix distro, obtain a silly haircut, grow facial ...

Hey, Scripting Guy! How Can I Reuse Functions?

 (image) Hey, Scripting Guy! I have a bunch of functions I wrote in PowerShell that I would like to use in other scripts. I am getting tired of cutting and pasting these things into various scripts over and over again. Surely there has got to be an easier way to do this! Have any ideas?- JB(image) (image) Hi JB, Of course, I have an ...

Hey, Scripting Guy! How Do I Use Windows PowerShell to Run the Same WMI Queries Against Multiple Computers?

(image) Hey, Scripting Guy! I need to run the same WMI queries against multiple computers on our network. Can I do this with Windows PowerShell?- KB(image) (image) Hi KB, Not only can you do this with Windows PowerShell, but you will be surprised at how easy it is to do. If you can create a text file in Notepad, you can run your multiple...