I am trying to run a cmd file that calls a PowerShell script from cmd.exe, but I am getting this error:
Management_Instal
Several answers point to execution policy. However some things require "runas administrator" also. This is safest in that there is no permanent change to execution policy, and can get past administrator restriction. Use with schedtask to start a batch with:
runas.exe /savecred /user:administrator powershell -ExecutionPolicy ByPass -File script.ps1
from both Jack Edmonds above, and Peter Mortensen / Dhana of post How to run an application as "run as administrator" from the command prompt?