Windows – Powershell DSC:无法获取http流
发布时间:2020-12-14 00:34:38 所属栏目:Windows 来源:网络整理
导读:我有一个用于配置Web服务器的Power shell DSC.我的服务器需要URL Rewrite模块,所以我从 Github gist中找到了代码: https://gist.github.com/sheastrickland/646c42789ce2df35d5c8 我的问题是当DSC进入我的块时: Package UrlRewrite { #Install URL Rewrite
我有一个用于配置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:UsersDaldDesktopMizzy.msi" 瞧,该文件出现在桌面上,正如预期的那样在6,12 MB处. 所以我不知所措,为什么我的DSC无法获得http流?我以管理员身份运行它,所以所有功能都应该可用,但也许我忘了设置一些东西. 任何帮助是极大的赞赏.
我通过下载有问题的可执行文件,然后在我的DSC中引用它来解决此错误.这不是我想要的解决方案,但它允许我的DSC继续进行.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 预编译的Windows OMF BLAS / LAPACK?
- 如何在Windows上创建IP别名
- wix – 使用嵌入式UI安装一系列嵌入式MSI包 – 显示常用进度
- windows – WP7知道何时在“导航到”页面中按下后退键
- windows – 为什么WaitForSingleObject(INVALID_HANDLE_VAL
- windows – WaitForSingleObject是否放弃了线程的时间片?
- win2003服务器管理器前兆检测
- 在rdp文件中保存密码| Windows 7
- windows – 我正在寻找一个批处理脚本,它将多个文本文件的名
- windows-mobile – Windows CE与Windows Mobile