Dmitry Porotnikov / PowerShell: Download ISO from MSDN Directly to the Server/VM

Created Mon, 18 Sep 2023 09:22:23 +0000 Modified Mon, 18 Sep 2023 09:22:23 +0000
64 Words

PowerShell: Download ISO from MSDN Directly to the Server/VM'

# Define the URL of the ISO file
$isoUrl = "https://myvs.download.prss.microsoft.com/yourisofilepath.iso"

# Define the destination path where the ISO file will be saved
$destinationPath = "C:\Temp\WS2012.iso"

# Download the ISO file
Invoke-WebRequest -Uri $isoUrl -OutFile $destinationPath

# Output the location where the ISO file has been saved
Write-Host "ISO file has been downloaded to $destinationPath