installeren van afstand

Anonymous
powershell
01/11/2022 5:32 PM
976 B
20
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

    }
Editor is loading...