Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start-DscConfiguration cannot connect the server machine

Tags:

powershell

dsc

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?

like image 923
Vish Avatar asked Jul 09 '26 23:07

Vish


1 Answers

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.

like image 58
Vish Avatar answered Jul 12 '26 01:07

Vish



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!