PowerShell Team

Automating the world one-liner at a time…

Invoke-Expression considered harmful

The PowerShell team frequently gets questions that start out “how do I get the quoting right for…” and the answer turns out to usually be – there is a simpler way – don’t use Invoke-Expression. The problem arises when trying to run some command external to PowerShell.  Some common reasons people try ...