installeren van afstand

 avatar
unknown
powershell
3 years ago
732 B
1
Indexable
#Aanzetten remote powershell
Enable-PSRemoting -Force


#Wacht 30 seconden om er zeker van te zijn dat de vorige command is uitgevoerd
Start-Sleep -s 30


#Downloaden en installeren van chocolatey.ps1
Invoke-Command -ComputerName Windows10-Student -ScriptBlock {

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

    choco feature enable -n allowGlobalConfirmation

    }
    
#Wacht 30 seconden om er zeker van te zijn dat de vorige command is uitgevoerd
Start-Sleep -s 30


#Installeer de aangevebe packages
Invoke-Command -ComputerName Windows10-Student -ScriptBlock {

    choco install adobereader

    }