【发布时间】:2016-09-13 01:08:22
【问题描述】:
我正在尝试在本地运行一个非常简单的 Powershell DSC 脚本。 (我从不打算在这个阶段拉取或推送配置文件)
我收到以下错误消息。 WS-Management 服务正在运行,但没有防火墙漏洞或保留端口(服务器恰好是网络服务器)......无论如何我可以让这个服务器只接受本地请求吗?
客户端无法连接到请求中指定的目的地。 验证目标上的服务是否正在运行并且正在接受 要求。查阅 WS-Management 的日志和文档 在目标上运行的服务,最常见的是 IIS 或 WinRM。如果 目的地是WinRM服务,在上面运行以下命令 分析和配置 WinRM 服务的目的地:“winrm 快速配置”。 + CategoryInfo : ConnectionError: (root/Microsoft/...gurationManager:String) [], CimException + 完全限定错误 ID:HRESULT 0x80338012 + PSComputerName : 本地主机
configuration SampleIISInstall
{
Node 127.0.0.1
{
File FileDemo {
Type = 'Directory'
DestinationPath = 'C:\TestUser3'
Ensure = "Present"
}
}
}
# Compile the configuration file to a MOF format
SampleIISInstall
# Run the configuration on localhost
Start-DscConfiguration -Path .\SampleIISInstall -Wait -Force -Verbose
【问题讨论】:
标签: web-services powershell dsc