Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

download and install virtualbox with powershell

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;$vBoxURL = "https://download.virtualbox.org/virtualbox";Invoke-WebRequest -Uri "$vBoxURL/LATEST-STABLE.TXT" -OutFile "$env:TEMPvirtualbox-version.txt";$version = ([IO.File]::ReadAllText("$env:TEMPvirtualbox-version.txt")).trim();$vBoxList = Invoke-WebRequest "$vBoxURL/$version";$vBoxVersion =$vBoxList.Links.innerHTML;$vBoxFile = $vBoxVersion | select-string -Pattern "-win.exe";$vBoxFileURL = "$vBoxURL/$version/$vBoxFile";Invoke-WebRequest -Uri $vBoxFileURL -OutFile "$env:TEMP$vBoxFile";start-process ("$env:TEMP$vBoxFile") --silent;
Source by gmusumeci.medium.com #
 
PREVIOUS NEXT
Tagged: #download #install #virtualbox #powershell
ADD COMMENT
Topic
Name
6+5 =