Showing results for June 2011 - PowerShell Team

Jun 3, 2011
2
0

Invoke-Expression considered harmful

PowerShell Team
PowerShell Team

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 Invoke-...