By 8 Gennaio 2019 0 Comments

Powershell – Come eseguire uno script PowerShell da un file batch

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 

Posted in: Powershell

About the Author:

shared on wplocker.com