Create-Item c:/msi -Type Directory Invoke-WebRequest 'http://download.microsoft.com/download/C/F/F/CFF3A0B8-99D4-41A2-AE1A-496C08BEB904/WebPlatformInstaller_amd64_en-US.msi' -OutFile c:/msi/WebPlatformInstaller_amd64_en-US.msi Start-Process 'c:/msi/WebPlatformInstaller_amd64_en-US.msi' '/qn' -PassThru | Wait-Process cd 'C:/Program Files/Microsoft/Web Platform Installer'; .\WebpiCmd.exe /Install /Products:'UrlRewrite2,ARRv3_0' /AcceptEULA /Log:c:/msi/WebpiCmd.log
Hi, Thank you for this example, you saved me time
For Win Server x64 IIS 10.0 script failed on dependency
DependencyFailed : External Cache 1.1
DependencyFailed : URL Rewrite 2.0
DependencyFailed : Application Request Routing 3.0
To make it working use /Products:’IIS-StaticContent,UrlRewrite2′ is required to add for installing UrlRewrite2 on IIS 10.0
First line, replace “create-item” with “new-item” to get this working.
Hi, thanks for posting this. I needed just the URL Rewrite portion for a set of developer install scripts. Below are my changes to get it working with latest powershell under Win 10. It should work for ARR as well, just not tested.
New-Item c:/msi -Type Directory
Invoke-WebRequest ‘http://download.microsoft.com/download/C/F/F/CFF3A0B8-99D4-41A2-AE1A-496C08BEB904/WebPlatformInstaller_amd64_en-US.msi’ -OutFile c:/msi/WebPlatformInstaller_amd64_en-US.msi
Start-Process ‘c:/msi/WebPlatformInstaller_amd64_en-US.msi’ ‘/qn’ -PassThru | Wait-Process
cd ‘C:/Program Files/Microsoft/Web Platform Installer’;
$pathargs = {WebpiCmd.exe /Install /Products:’UrlRewrite2′ /AcceptEULA /Log:c:/msi/WebpiCmd.log}
Invoke-Command -ScriptBlock $pathargs