PowerShell DSC で xWebsite リソースを使用しようとしていますが、Set-TargetResource に失敗し続けます。エラーは
PowerShell provider MSFT_xWebsite failed to execute Set-TargetResource functionality with error message:
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
リソースは次のようになります
WindowsFeature IIS
{
Ensure = “Present”
Name = “Web-Server”
}
xWebsite Website
{
Ensure = "Present"
Name = "Website"
PhysicalPath = "E:\www\site"
State = "Started"
BindingInfo = MSFT_xWebBindingInformation
{
Protocol = 'HTTP'
Port = 7777
HostName = '*'
}
DependsOn = "[WindowsFeature]IIS"
}
DSC の例の 1 つからコピーしたところ、最初は上記のエラーが返されませんでした。何が変わったのかわかりませんが、その後の実行で Web サイトを作成できなくなりました。DSC に関するトラブルシューティング コンテンツもまだ多くありません。他の誰かがこの問題に遭遇したことを願っています。