5

I have a Powershell DSC I am using to configure a web server. My server will need the URL Rewrite module, so I've gotten that code from a Github gist found at:

https://gist.github.com/sheastrickland/646c42789ce2df35d5c8

My issue is that when the DSC runs into my block:

    Package UrlRewrite
    {
        #Install URL Rewrite module for IIS
        DependsOn = "[cNtfsPermissionEntry]AppPoolPermissionsSet"
        Ensure = "Present"
        Name = "IIS URL Rewrite Module 2"
        Path = "http://download.microsoft.com/download/6/7/D/67D80164-7DD0-48AF-86E3-DE7A182D6815/rewrite_2.0_rtw_x64.msi"
        Arguments = "/quiet"
        ProductId = "EB675D0A-2C95-405B-BEE8-B42A65D23E11"
    }

It throws an error of:

PowerShell DSC resource MSFT_PackageResource  failed to execute Set-  
TargetResource functionality with error message: Could not get the http    
stream for file http://download.microsoft.com/download/6/7/D/67D80164-7DD0-
48AF-86E3-DE7A182D6815/rewrite_2.0_rtw_x64.msi 

At first I thought my server might have a bad proxy setting, so I checked to see if I could download the file at all with this statement:

wget http://download.microsoft.com/download/6/7/D/
67D80164-7DD0-48AF-86E3-DE7A182D6815/rewrite_2.0_rtw_x64.msi 
-OutFile "C:\Users\Dald\Desktop\Mizzy.msi"

Lo and behold, the file appeared right on the desktop clocking in at 6,12 MB as expected.

So I'm at a loss, why would my DSC not be able to get the http stream? I'm running it as Administrator, so all functionality should be available, but maybe I've forgotten to set something.

Any help is greatly appreciated.

1 Answer 1

2

I went around this error by downloading the executable in question, and then referencing that in my DSC. It's not the solution I wanted, but it allows my DSC to proceed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .