아주 간단한 Powershell DSC 스크립트를 로컬로 실행하려고합니다. (필자는이 단계에서 설정 파일을 가져 오지 않을 것입니다.)Powershell DSC 스크립트를 로컬에서 실행하는 방법
다음과 같은 오류 메시지가 나타납니다. WS 관리 서비스가 실행 중이지만 방화벽 구멍이나 포트가 예약되어 있지 않습니다 (서버가 웹 서버로 존재 함) ... 어쨌든이 서버가 로컬 요청 만 수락하도록 허용 할 수 있습니까?
The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". + CategoryInfo : ConnectionError: (root/Microsoft/...gurationManager:String) [], CimException + FullyQualifiedErrorId : HRESULT 0x80338012 + PSComputerName : localhost
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