为什么DSC无法find安装的资源?

我正在尝试应用使用安装的模块资源的DSCconfiguration。 但是,当我运行Start-DscConfiguration ,出现此错误:

PowerShell DSC资源********在PowerShell模块path中不存在,也不会注册为WMI DSC资源。
+ CategoryInfo:InvalidOperation:(root / Microsoft / … gurationManager:String)[],CimException
+ FullyQualifiedErrorId:DscResourceNotFound

但是,当我login到服务器并运行Get-DscResource ,缺less的资源在那里。

为什么DSC无法find资源?

我的本地计算机和服务器之间DSC资源所属模块的版本不同。 在我的本地计算机上,我的configuration被转换为MOF文件,我有版本2.2.0(代码为简洁起见剪切):

 instance of ******** as $********1ref { ModuleName = "********"; ModuleVersion = "2.2.0"; }; 

但是服务器有版本2.1.0:

 > Get-Module -ListAvailable Directory: C:\Program Files\WindowsPowerShell\Modules ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Script 2.1.0 ******** ******** 

PowerShell Gallery上提供了此特定模块。 调用Update-Module获得了最新版本到我的服务器上。 我也可以降级我的本地电脑。