+393713742262
By Assistenza Informatica Firenze/Gennaio 8, 2019/Comments are closed
Questo è il metodo per eseguire uno script PowerShell da un file batch :
PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& ‘C:\Users\SE\Desktop\ps.ps1′”
E se hai bisogno di eseguire il tuo script PowerShell come amministratore:
PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& {Start-Process PowerShell -ArgumentList ‘-NoProfile -ExecutionPolicy Bypass -File “”C:\Users\SE\Desktop\ps.ps1″”‘ -Verb RunAs}”
Powershell, Powershell come amministratore, batch Powershell