Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! Quick-Hits Friday: The Scripting Guys Respond to a Bunch of Questions (02/06/09)

How Can I Pipe Over a Variable for Use in a File Name? Hey, Scripting Guy! Sorry to bother you but I have been looking for an answer to this for a few hours now. I’ve also been experimenting but have had no luck figuring it out yet. How do you get a variable to pipe over to use in a file name? For example, I am trying to get the ...

Hey, Scripting Guy! How Can I Hide My Desktop Wallpaper?

I give a lot of presentations, and the background picture of my baby alpaca, while fascinating to me, probably does not have the same level of attraction to my clients. I know I can mouse around and change the desktop picture to some bland color, but I prefer to run a script and make the change because I can have the same script close Office...

Hey, Scripting Guy! How Can I Rename All of the Pictures in a Folder?

My scripting husband travels a great deal with his job, and he takes these really cool pictures. Unfortunately, he is somewhat lazy about downloading the pictures from the camera. As a result, we have pictures from Hawaii that are named Phoenix_Desert_05.jpg. Obviously, I know the difference between a desert and a beach, but it is rather ...

Hey, Scripting Guy! How Do I Rename All Files in a Folder?

I want to use SharePoint for our company’s script library, but it will not allow us to upload a VBScript file. It accepts PS1 files just fine, but we still have quite a few VBScripts and we need to keep a central repository of them. We have decided to rename them from .vbs files to .txt files so that we can keep them in SharePoint. I know ...

Hey, Scripting Guy! How Can I Tell How Much Free Disk Space a User Has?

I know most people have heard of Moore’s Law that is named after Gordon Moore, but have you ever heard of Bob’s law? Bob was the senior network administrator when I first became an IT pro, and he created what he called Bob's Law. Briefly stated it says this: "A user's demand for storage space will always expand to meet the available ...