3

I am trying to run my DSC configuration against a remote machine and end up with the following error

VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =
SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
root/Microsoft/Windows/DesiredStateConfiguration'.
The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client
computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the
TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts
list might not be authenticated. You can get more information about that by running the following command: winrm help
config.
    + CategoryInfo          : NotEnabled: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : HRESULT 0x803380e4
    + PSComputerName        : vishtest.timmons.com

VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 0.169 seconds

The server has the WinRM service running and configured for running over HTTPS. The client machine can connect to the remote machine successfully with the Enter-PSSession command.

Enter-PSSession -computerName vishtest.timmons.com -credential $credential -UseSSL

Any ideas on what I could be missing here?

Vish
  • 827
  • 11
  • 21
  • Edit your question and include the actual `Start-DscConfiguration` command that you're running. Also, have you installed the `DSC-Service` feature on the target machine? – briantist Jan 23 '15 at 23:05
  • Sorry about missing that out, here it is Start-DscConfiguration -machineName [myservername] -wait -verbose I wasn't aware of the Dsc-Service, just checked it out though and it seems like it is for a DSC pull configuration. I don't think I am doing a push or pull configuration, atleast not yet. I am trying to run the configuration on my machine to update the server manually. Hope that helps clear some things. – Vish Jan 25 '15 at 22:54
  • Do you mean `-ComputerName` rather than `-machineName`? `-Path` is a required parameter and is missing. You are in fact trying to do a Push configuration. You can't do neither. The `Dsc-Service` feature is required on any node where configuration will be applied and isn't just for setting up a Pull server. – briantist Jan 26 '15 at 02:30
  • Yes, @briantist. I did get that wrong. Consequences of responding without being at the work computer. Sorry about that. But I did figure out the answer and have posted it. I did not need install or start the Dsc-Service on the target computer for pushing configuration to it. Thank you for your help. – Vish Jan 27 '15 at 21:02

2 Answers2

5

Just figured it out with some help from some tweeps. I had to create a CimSession with the -UseSSL flag and pass that session to the Start-DscConfiguration command. The Start-DscConfiguration by itself does not have the -UseSSL option. Did not need any DSC service on the target to push configuration.

Vish
  • 827
  • 11
  • 21
  • 3
    For future reference: $option = New-CimSessionOption -SkipCNCheck -UseSsl > $session = New-CimSession -ComputerName $env:COMPUTERNAME -SessionOption $option > Start-DscConfiguration -Path "MyPath" -CimSession $session -Wait -Verbose > Remove-CimSession $session – Leon Bouquiet Oct 02 '15 at 13:55
1

Try running this command :

Enable-PSRemoting -Force

This always works for me when I face that error!

Inchara
  • 241
  • 4
  • 12