tshm
9/2/2014 - 9:18 AM

running powershell script from batch file.

running powershell script from batch file.

Powershell.exe -executionpolicy remotesigned -Command "& '%~dpn0.ps1'"  
" policy can be: remotesigned / bypass / unrestricted




PowerShell.exe -Command "& {Start-Process PowerShell.exe -ArgumentList '-ExecutionPolicy Bypass -File ""%~dpn0.ps1""' -Verb RunAs}"
push-location (split-path $MyInvocation.MyCommand.path)