execution policy suggestions


hi,

   i seeking suggestions setting execution policy, there scripts have written shared people dont know powershell, if give them script , ask them set execution policy before running script may become bit pain them (of course there doc how screenshots) , planning set execution policy through script everytime or 1 time or whatever. there scripts used once in week , there running scheduled tasks , should scripts running once has mandatory parameters. in case of parameterised script not able set execution policy @ top, not sure why. can throw light on this  

try running .ps1 using command

powershell.exe -executionpolicy bypass -nologo -noninteractive -noprofile -windowstyle hidden -file <path_to_script_name>

this bypass execution policy.


(please click on "vote helpful" and/or "mark answer", if has helped you. )



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL