Scripting Blog

A place to learn about PowerShell and share stories of automation

Avoid Scripting: Use PowerShell Command History

Summary: Microsoft Scripting Guy, Ed Wilson, talks about avoiding Windows PowerShell scripting by using command history.  Hey, Scripting Guy! I used to have a program that I could use to keep track of commands I typed at the command prompt. It permitted me to use macros to replay those commands or to select which commands I wanted to run...

PowerTip: Use PowerShell to Show Illegal File Name Characters

Summary: Use Windows PowerShell to display illegal characters for a file name.  How can I use Windows PowerShell to easily obtain a list of characters that are not permitted in file names?  Use the GetInvalidFileNameChars static method from the System.IO.Path .NET Framework class: [System.IO.Path]::GetInvalidFileNameChars...

Write and Run PowerShell Script Without Scripting

Summary: Microsoft Scripting Guy, Ed Wilson, talks about writing and running a Windows PowerShell script without scripting.  Hey, Scripting Guy! I like using the Windows PowerShell ISE, but I do not have rights to run a script. I am stuck using a twenty year-old command prompt with Windows PowerShell inside. What’s up with that? &...