Windows – Powershell DSC:无法获取http流

我有一个用于配置Web服务器的Power shell DSC.我的服务器需要URL Rewrite模块,所以我从 Github gist中找到了代码

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

我的问题是当DSC进入我的块时:

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"
    }

它抛出一个错误

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

起初我以为我的服务器可能有一个糟糕的代理设置,所以我检查是否可以使用以下语句下载该文件

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"

瞧,该文件出现在桌面上,正如预期的那样在6,12 MB处.

所以我不知所措,为什么我的DSC无法获得http流?我以管理员身份运行它,所以所有功能都应该可用,但也许我忘了设置一些东西.

任何帮助是极大的赞赏.

我通过下载有问题的可执行文件,然后在我的DSC中引用它来解决错误.这不是我想要的解决方案,但它允许我的DSC继续进行.

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...