1
votes

I'm attempting to run the xChrome sample (https://gallery.technet.microsoft.com/scriptcenter/DSC-Resource-Kit-All-c449312d) on an Azure VM and it fails to run. Everything runs and executes, but I receive the error (larger log snippet below):

CategoryInfo : ObjectNotFound: (MSFT_xChrome\MSFT_xChrome:String) [Configuration]

AzureVM is Windows Server 2012 with Powershell Version 5: $PSVersionTable.PSVersion

Major Minor Build Revision


5 0 9883 0
The steps I use to execute are:

  1. Download xChrome extension (from above url) and inflate it into my modules directory
  2. Publish-AzureVMDscConfiguration -ConfigurationPath C:\Users\Documents\WindowsPowerShell\Modules\xChrome\Example\Sample_xChrome.ps1 -Force
  3. Get-AzureVM -ServiceName '' -Name '' | Set-AzureVMDscExtension -ConfigurationArchive Sample_xChrome.ps1.zip -ConfigurationName Sample_InstallChromeBrowser -ConfigurationArgument @{Language='en';LocalPath='$env:SystemDrive\Windows\DtlDownloads\GoogleChromeStandaloneEnterprise.msi'} | Update-AzureVM
  4. **The error snippet:* [2015-04-17T23:35:06] Executing the configuration function to generate the MOF files. PSDesiredStateConfiguration\Configuration : The module 'MSFT_xChrome' could not be loaded. For more information, run 'Import-Module MSFT_xChrome'. At C:\Packages\Plugins\Microsoft.Powershell.DSC\1.7.0.0\DSCWork\Sample_xChrome.ps1.8\Sample_xChrome.ps1:3 char:1
    • Configuration Sample_InstallChromeBrowser
    • ~~~~~~~~~~~~~
    • CategoryInfo : ObjectNotFound: (MSFT_xChrome\MSFT_xChrome:String) [Configuration], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : CouldNotAutoLoadModule,Configuration

[2015-04-17T23:35:08] Removing file lock C:\Packages\Plugins\Microsoft.Powershell.DSC\1.7.0.0\bin\DscExtensionHandler.ps1 : Error enabling the DSC Extension: Errors occurred while processing configuration 'Sample_InstallChromeBrowser'. At line:7 char:2 + C:\Packages\Plugins\Microsoft.Powershell.DSC\1.7.0.0\bin\DscExtensio ...

2
Have you posted your question on that gallery entry's Q&A tab?Bill_Stewart
Have you tried the current module or checked any of the answers?TravisEz13

2 Answers

2
votes

I fixed this error by changing how I was importing the module.

Import-DscResource -ModuleName xChrome -Name MSFT_xChrome

0
votes

The error implies that a module could not be loaded. Can you connect to the VM using remote desktop and check if Get-DscResource -Module xChrome lists the resource correctly