There are a couple of "reserved" variables in PowerShell and $host happens to be one of them I'm afraid.
Pick another name for the variable and you should be good.
There are a couple of "reserved" variables in PowerShell and $host happens to be one of them I'm afraid.
Pick another name for the variable and you should be good.