Scripting Blog

A place to learn about PowerShell and share stories of automation

Solve Problems with External Command Lines in PowerShell

Summary: Microsoft Scripting Guy Ed Wilson discusses problems creating external command arguments using Windows PowerShell.   Hey, Scripting Guy! I am using an external program that takes a –o command-line parameter followed by a path location. The program permits no space between the –o parameter and the supplied path. For ...

Avoid Blank Lines at End of a Text File with PowerShell

Summary: Microsoft Scripting Guy Ed Wilson teaches how to avoid writing blank lines at the end of a file by using Windows PowerShell.   Hey, Scripting Guy! I have a problem with my script. For example, in my script, I build up a variable. Then when I write the variable to a file, I always end up with an extra blank line at the end of the ...

Restore NTFS Security Permissions by Using PowerShell

Summary: Superhero BATCHman restores NTFS security permissions using Windows PowerShell.   Microsoft Scripting Guy Ed Wilson here. Well, it is time once again for BATCHman. This time, it is Episode 12. Take it away, Sean. When the digital crash In a blink and a splash A gleam in the night To make all wrongs right Our heroes fly out And ...

Use PowerShell and Regular Expressions to Parse Handle Output

Summary: Windows PowerShell superhero BATCHman uses regular expressions to parse output from handle.   Microsoft Scripting Guy Ed Wilson here. Today we have Episode 10 of the BATCHman series.   Whenever trouble happens in systems and people will call, and darkness rolls out causing your fall, Creatures of bits roam in the night, ...