Showing results for Windows PowerShell - Scripting Blog [archived]

Jul 3, 2009
Post comments count0
Post likes count0

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

ScriptingGuy1
ScriptingGuy1

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 all of the dr...

Scripting Guy!Windows PowerShellscripting techniques
Jul 1, 2009
Post comments count0
Post likes count0

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

ScriptingGuy1
ScriptingGuy1

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 rather than n...

Scripting Guy!Windows PowerShellscripting techniques
Jun 30, 2009
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Supply More Than One Value from the Command Line?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I do not think I write very complicated scripts, but quite often I find that it would be nice to be able to supply more than one value from the command line. It seems that everything I see written for Windows PowerShell uses the $args variable to get command line input, and I cannot figure out how to make $args accept more than...

Scripting Guy!Windows PowerShell
Jun 3, 2009
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Collect System Restore Information in Windows Vista?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I was looking at System Restore on my Windows Vista computer, and I had an idea. Wouldn’t it be great if I could script the collection of information for System Restore? I would like it to tell me how much disk space is being consumed, as well as when it is scheduled to run. I think you should write a script that will let me d...

Scripting Guy!Windows PowerShellbackup and system restore
Jun 2, 2009
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Enable and Disable Offline Files?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! The script you wrote yesterday to check the status of offline files was pretty cool. However, it does not help me if I want to enable or disable offline files on my computer. Do you have a script to allow me to actually dooooooooo something?- LS Hi LS, Doooooooooo we have a script that actually does something? Of course we do...

Scripting Guy!Windows PowerShellbackup and system restore