Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! Is There an Easier Way to Work with XML Files?

 Hey, Scripting Guy! I have a file that I need to parse. It is an XML file, and it is very ugly. Who in the world ever thought that an XML file would be better than a plain CSV file? Unfortunately, Microsoft seems to be enamored with XML, and I cannot get away from it. Surely, there must be a better way to work with XML than to go ...

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

In this post:  Dealing with Quarantined File Types and Exchange ServerHey, Scripting Guy! I have spent most of this week Googling, experimenting, and fighting with Exchange 2007. The problem I have been working on was caused by one of my colleagues who came to me and asked if I can make it possible for him to ...

Hey, Scripting Guy! How Can I Create Variables in Windows PowerShell?

 Hey, Scripting Guy! In VBScript, it was easy to create a variable; all I had to do was use the DIM statement. I did not need to specify a type or a value or anything. I just used DIM and the variable would be created. How do I create variables in Windows PowerShell? Please tell me you haven’t made it harder.-- TL ...

Hey, Scripting Guy! Can I Change on the Fly the Way Windows PowerShell Functions Work?

 Hey, Scripting Guy! I have started using functions in Windows PowerShell to encapsulate complex commands, and it works pretty well. However, I would like to be able to change the way the functions work on the fly. By this I do not mean that I will throw the computer across the room and see how the function works, but rather I want ...

New! On-demand translation of our blog!

You may have noticed something new about the Hey, Scripting Guy! Blog today (very top of the page): If you would prefer to read this blog in another language, you can now do that--on demand! Available languages are: Just choose the version of "Translate this page" from the drop-down list that...