Silent install IIS UrlRewrite and ARR by #PowerShell

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
Advertisement

3 thoughts on “Silent install IIS UrlRewrite and ARR by #PowerShell

  1. 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

  2. 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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: