Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Get a List of All the .PST Files on a Computer?

  Hey, Scripting Guy! How can I get a list of all the .pst files on a computer - along with their size and their location - and then save that information to a comma-separated values file?-- DC Hey, DC. If you hang around baseball fields long enough sooner or later you’ll hear someone use the expression “tailor-made.” Typically ...

How Can I Print a Test Page to a Printer?

Hey, Scripting Guy! How can I print a test page to a printer?-- RR Hey, RR. As long as you’re running Windows XP this is an easy one; that’s because the revised Win32_Printer class introduced in Windows XP includes a method called PrintTestPage. As you might expect, this means you can bind to a given printer on a computer and then call ...

How Can I Convert a Comma-Separated Values File to a Tab-Separated Values File?

Hey, Scripting Guy! How can I convert a comma-separated values file to a tab-separated values file?-- RV Hey, RV. Depending on the nature of your comma-separated values (CSV) file this is either very easy or a little bit tricky. Let’s follow the Scripting Guys Philosophy of Life and look at the easy one first. Note. Of course, in our...

How Can I Delete a Folder and All Its Subfolders?

Hey Scripting Guy! How can I delete a folder and all its subfolders?-- FB Hey, FB. You know, a lot of people think the Scripting Guys know everything there is to know about scripting. Let’s put it this way: we wish. In fact, it’s only when we begin to think that we do know something about scripting that we get ourselves into trouble. ...

How Can I Monitor for Different Types of Events With Just One Script?

  Hey, Scripting Guy! Is there any way to monitor a folder for file creations and deletions, all with just one script? -- HA Hey, HA. By the way, thanks for the question: you temporarily saved us from answering a different question, one that was proving a bit difficult thanks to some surprising differences between Windows XP Service ...

Feedback usabilla icon