1

マシンに対してコマンドを実行すると、次のエラーが発生します-

PS C:\Windows\system32> $cimsession = New-CimSession -Credential (Get-Credential -UserName "test" -Message "test") -ComputerName test.cloudapp.net -Port 58718 -SessionOption $cimsessionoption

PS C:\Windows\system32> Get-DscConfiguration -CimSession $cimsession

Get-DscConfiguration : Current configuration does not exist. Execute Start-DscConfiguration command with -Path parameter to specify a 
configuration file and create a current configuration first.
At line:1 char:1
+ Get-DscConfiguration -CimSession $cimsession
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Get-DscConfiguration],  
   CimException
    + FullyQualifiedErrorId : MI RESULT 1,Get-DscConfiguration
    + PSComputerName        : powerlabdns.cloudapp.net

これは何を意味するのでしょうか?

4

1 に答える 1

3

DSC ファイルを実行していません。(エラーが示すように) 存在しない現在の DSC 構成を要求しています。

Start-DscConfigurationエラーが示すように、最初に実行する必要があります。-PathMOF ファイル (コンパイルされた構成) が存在する (ターゲット ノードに関連する) ディレクトリであるその呼び出しにa を渡す必要があります。

Get-DscConfigurationこれを行うと、呼び出して現在の構成を確認できるようになります。

于 2015-01-16T00:40:27.087 に答える