1

升级到 WMF 5.0 后,DSC 似乎在安装我的基于自定义类的资源模块时遇到问题。

PS C:\Users\alexis.coles.adm> Start-DscConfiguration -ComputerName ComputerName -Credential $autoCred -Path E:\DevResetRuntime\Mofs -Wait -Verbose -Force
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Micr
osoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer ComputerName with user sid S-1-5-21-xxxxxxxxx-3810362189-311025990-3170.
VERBOSE: [ComputerName]: LCM:  [ Start  Set      ]
VERBOSE: [ComputerName]:                            [DSCEngine] Module SxDeployment_1.11.zip downloaded.
VERBOSE: [ComputerName]:                            [DSCEngine] Resource SxDeployment version 1.11 installed.
VERBOSE: [ComputerName]: LCM:  [ End    Set      ]
The PowerShell DSC resource C:\Program Files\WindowsPowerShell\Modules\SxDeployment\1.11\DscResources\PsPackageProvider does not contain the corresponding MOF file C:\Program 
Files\WindowsPowerShell\Modules\SxDeployment\1.11\DscResources\PsPackageProvider\PsPackageProvider.schema.mof. Could not install module dependencies needed by the configuration.
    + CategoryInfo          : ObjectNotFound: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : ProviderSchemaFileNotFound
    + PSComputerName        : ComputerName

如果我在尚未升级的机器上运行它,它会安装得很好,并且模块会从资源模块管理器中下载并解压缩到正确的位置。

然而,在升级的机器上运行它只会在 C:\program files\windowsPowershell\Modules 中创建一个空的 SxDeployment 文件夹。

如果我将提取好的文件夹从未升级的盒子复制到新盒子,则配置运行良好。

有任何想法吗?

更新

我的资源 zip 文件名为 SxDeployment_1.27.zip

它只包含以下2个文件

SxDeployment.psd1
SxDeployment.psm1

我希望这会被提取到以下文件系统结构中:

Modules
  SxDeployment
    1.27
      SxDeployment.psd1
      SxDeployment.psm1

然而我得到的只是

Modules
  SxDeployment
4

0 回答 0