Bazen bir uygulamayı Run as Admin ile çalıştırmak istersiniz. Bunu yapmak için System. System.Diagnostics.ProcessStartInfo kütüphanesinden faydalanacağız.
function Run-As{
param ($uygulama)
$runas = new-object "System.Diagnostics.ProcessStartInfo"
$runas.Verb = "runas"
$runas.FileName = $app
[System.Diagnostics.Process]::Start($psi)
}
Run-As powershell
Ve sonuç
Sorular icin bakionur@bakionur.com