I'm trying to write a DSC configuration for an Azure VM that I am creating using Resource Manager. I want to use xRemoteFile, so I try to import the xPSDesiredStateConfiguration module, but when I deploy it is not found.
I searched the web, and learned that I need to install the xPSDesiredStateConfiguration module before I deploy. How do I do that when I just created the VM on Azure?
Start of configuration file:
Configuration Main
{
Param ( [string] $nodeName )
Import-DscResource -ModuleName PSDesiredStateConfiguration
Import-DscResource -Name MSFT_xRemoteFile -ModuleName xPSDesiredStateConfiguration
The error message:
08:56:12 - [ERROR] + Import-DscResource -Name MSFT_xRemoteFile -ModuleName xPSDesiredState ...
08:56:12 - [ERROR] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
08:56:12 - [ERROR] The DSC engine could not load the module 'xPSDesiredStateConfiguration'. It
08:56:12 - [ERROR] was not found on the system.".