Author Posts

November 18, 2016 at 11:08 pm

I'm attempting to register a Windows 10 machine with my Azure Automation DSC Pull server, by configuring its LCM. The Set-DscLocalConfigurationManager command is failing with a connection failure. The Windows 10 machine is named "EricSamsungLaptop".

I followed instructions here: https://docs.microsoft.com/en-us/azure/automation/automation-dsc-onboarding, and ran the DSC Meta configration script.

Since it's taking about 10 seconds for the Set-DscLocalConfigurationManager command to fail, I wonder if the problem is with my account setup on Azure, but maybe it's something with my meta.mof.

This is my first foray into DSC, and any help would be appreciated. Thanks!

Here's the meta.mof I'm using to update the LCM:

/*
@TargetNode='EricSamsungLaptop'
@GeneratedBy=eric
@GenerationDate=11/18/2016 15:42:49
@GenerationHost=ERICSAMSUNGLAPT
*/

instance of MSFT_WebReportManager as $MSFT_WebReportManager1ref
{
SourceInfo = "C:\\Users\\eric\\dsc\\AzureAuto_OnBoarding.ps1::78::10::ReportServerWeb";
 ServerURL = "";
 ResourceID = "[ReportServerWeb]AzureAutomationDSC";
 RegistrationKey = "";

};

instance of MSFT_DSCMetaConfiguration as $MSFT_DSCMetaConfiguration1ref
{
RefreshMode = "Push";
 AllowModuleOverwrite = False;
 ActionAfterReboot = "ContinueConfiguration";
 RefreshFrequencyMins = 30;
 RebootNodeIfNeeded = False;
 ConfigurationModeFrequencyMins = 15;
 ConfigurationMode = "ApplyAndMonitor";

  ReportManagers = {
  $MSFT_WebReportManager1ref  
 };
};

instance of OMI_ConfigurationDocument
{
 Version="2.0.0";
 MinimumCompatibleVersion = "2.0.0";
 CompatibleVersionAdditionalProperties= { "MSFT_DSCMetaConfiguration:StatusRetentionTimeInDays" };
 Author="eric";
 GenerationDate="11/18/2016 15:42:49";
 GenerationHost="ERICSAMSUNGLAPT";
 Name="DscMetaConfigs";
};

Here's the Set-DscLocalConfigurationManager command, run as local admin:

PS C:\WINDOWS\system32> Set-DscLocalConfigurationManager -path C:\Users\eric\DSC\DscMetaConfigs -Verbose
VERBOSE: Performing the operation "Start-DscConfiguration: SendMetaConfigurationApply" on target
"MSFT_DSCLocalConfigurationManager".
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =
SendMetaConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
root/Microsoft/Windows/DesiredStateConfiguration'.
The client cannot connect to the destination specified in the request. Verify that the service on the destination is
running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the
destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the
destination to analyze and configure the WinRM service: "winrm quickconfig".
    + CategoryInfo          : ConnectionError: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : HRESULT 0x80338012
    + PSComputerName        : EricSamsungLaptop

VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Set-DscLocalConfigurationManager finished in 10.097 seconds.

November 20, 2016 at 1:25 pm

I tried generating the meta.mof with the Azure Automation cmdlet: Get-AzureRmAutomationDscOnboardingMetaconfig, and got the exact same result. Windows recognizes my network connection as Private, and I did even experiment with turning off the Windows firewall, but got exactly the same result.

November 28, 2016 at 2:44 am

I had to enable Power Shell Remoting (PS Remoting to get the Windows 10 node added to Azure Automation. I enabled PS Remoting by running the following cmdlet from an elevated PowerShell session: Enable-PSRemoting.

Once enabled, the Set-DscLocalConfigurationManager cmdlet worked, and the node was added to my instance of Azure Automation.