For whatever reason, sometimes you just can’t upgrade the installed version of PowerShell on a server. In this case, I wanted to make use of the Invoke-SqlCommand command.
The most simple way around this limitation is to add a module to the server that includes a command that performs the same function.
Jourdan Templeto’s Simple SQL in PowerShell post has a cmdlet that can be cut and pasted into a new PowerShell module file and then easily accessed from your own scripts. Simple.