There a some blog posts describing that Invoke-Expression
opens the door to injections attacks, and therefore is considered as insecure (what I understand). Additionally the posts describes ways to overcome Invoke-Expression
by usage of the call-operator (&
).
My question: What is a valid scenario to use Invoke-Expression
? If there is no valid one, why is it still part of actual PowerShell (6) releases?