Last active
November 15, 2022 13:55
-
-
Save fqjony/1293d1bd63e975d6627cd892e3a37d12 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $FilePath = "C:\Windows\Temp\WindowsAzureVmAgent.msi" | |
| Retry-WebRequest -Params @{ | |
| Uri='https://github.com/Azure/WindowsVMAgent/releases/download/2.7.41491.1071/WindowsAzureVmAgent.amd64_2.7.41491.1071_2209271071.fre.msi'; | |
| OutFile = $FilePath | |
| } | |
| $DataStamp = get-date -Format yyyyMMddTHHmmss | |
| $logFile = '{0}-{1}.log' -f $FilePath,$DataStamp | |
| $MSIArguments = @( | |
| "/i" | |
| ('"{0}"' -f $FilePath) | |
| "/qn" | |
| "/norestart" | |
| "/L*v" | |
| $logFile | |
| ) | |
| Start-Process "msiexec.exe" -ArgumentList $MSIArguments -Wait -NoNewWindow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment