title: In what scenario was Invoke-Expression designed to be used?
body: <p>9/10 times if you are trying to use the <code>Invoke-Expression</code> cmdlet, there is a better way. Building the arguments to a command dynamically? Use an array of arguments. Building the arguments to a cmdlet? Use splatting with an array or hashtable. Your command has a space in the path to it? Use the call operator (<code>&amp;</code>).</p>
  
  <p>This might seem open ended, but <code>Invoke-Expression</code> is an easily accessible cmdlet where the answer is almost always to never use it. But the cmdlet exists for a reason, is not deprecated, and most criticisms of its use state something similar to, "it's almost never the right answer", but never states when it is acceptable to use it. In what case is it acceptable to use <code>Invoke-Expression</code>? Or to word it a bit less openly, how was <code>Invoke-Expression</code> designed to be used?</p>