![](/img/trans.png)
[英]Installing DSC resource nxComputerManagement and nxNetworking on Windows Server 2012 R2 WMF 4.0
[英]Unable to execute DSC file i n Windows server 2012 R2 from remote machine
當我執行命令到機器時,我收到以下錯誤 -
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
這是什么意思?
您沒有執行DSC文件,您正在請求當前不存在的DSC配置(如錯誤所示)。
您需要首先運行Start-DscConfiguration
,因為錯誤說明了。 您必須將-Path
傳遞給該調用,該調用是MOF文件(已編譯的配置)所在的目錄(相對於目標節點)。
一旦你這樣做,你就可以調用Get-DscConfiguration
來查看當前的配置。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.