I am trying to run a cmd
file that calls a PowerShell script from cmd.exe
, but I am getting this error:
Management_Instal
If you're here because of running it with Ruby or Chef and using `` system execution, execute as follows:
`powershell.exe -ExecutionPolicy Unrestricted -command [Environment]::GetFolderPath(\'mydocuments\')`
That command is for getting "MyDocuments" Folder.
-ExecutionPolicy Unrestricted
does the trick.
I hope it's helpful for someone else.