Hello,
I'm trying to call a command in PowerShell using an environment variable. Using cmd, I would call the exe using the following command %userprofile%\somefolder\random.exe. When I use this command, $env:homepath\somefolder\random.exe, I get an unexpected token error. Browsing the web, I found this command ~\somefolder\random.exe and this works, but I don't understand why it works and $env:homepath\somefolder\random.exe doesn't to call the script?