I need to copy a file from an azure storage account to a vm via azure DSC.
Below is what i tried
Configuration ExampleDSC { Install-Module -Name 'xPSDesiredStateConfiguration' -force Import-DscResource -Name 'xPSDesiredStateConfiguration'
Node localhost
{
File CreateFolder
{
Type = 'Directory'
DestinationPath = 'C:\NewFolder'
Ensure = "Present"
}
xRemoteFile remotefile {
# for uri generate a sas token then copy the sas token url in the uri line below
Uri = "storageblob+SAS token"
DestinationPath = "C:\NewFolder\"
DependsOn = "[File]CreateFolder"
MatchSource = $false
}
}
But I am getting below error - please help
Error message: "The DSC Extension received an incorrect input: An error occurred while executing script or module 'importcertificate.ps1': At C:\Packages\Plugins\Microsoft.Powershell.DSC\2.80.1.0\DSCWork\importcertificate.1\importcertificate.ps1:4 char:6
-
Import-DscResource -Name 'xPSDesiredStateConfiguration'
Unable to load resource 'xPSDesiredStateConfiguration': Resource not found.. Please correct the input and retry executing the extension."
Should i only use : install PSDesiredStateConfiguration?