0

I am trying the below code to install the google chrome using DSC in azure.

Configuration InstallGoogleChorme
{

Import-DscResource –ModuleName 'PSDesiredStateConfiguration'

Node installChrome
    {
        #Google Chorme
         Package Chorme
         {
         Ensure = 'Present'
         Name = 'Google Chrome'
         Path = '‪C:\Users\google\Desktop\ChromeSetup.exe'
         ProductId = ''
         Arguments = '/silent /install'
        }
    }
}



InstallGoogleChorme -OutputPath C:\

Start-DscConfiguration -Path c:\ -Wait -Verbose -Force

But am unable to install and got the below error.

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 : installChrome

Can any one help me how to solve it/

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
user6264
  • 175
  • 1
  • 7
  • 22

2 Answers2

0

Verify the winrm listener by running "winrm enumerate winrm/config/listener" on VM. If it's not working make sure you have winrm enable and listening over https

  • The command gives the response as follows Listener Address = * Transport = HTTP Port = 5985 Hostname Enabled = true URLPrefix = wsman CertificateThumbprint ListeningOn = 10.0.0.6, 127.0.0.1, ::1, fe80::7542:51e2:cb7c:b454%6 – user6264 Apr 14 '20 at 15:20
  • You only have HTTP listener and not HTTPS, try enabling HTTPS listener https://support.microsoft.com/en-us/help/2019527/how-to-configure-winrm-for-https Ansible provides a script for this purpose and it can be used for other options as well like cred ssp etc https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 – Ankit Kotnala Apr 15 '20 at 17:18
0

According to that error message, you could try to add the target IP address to the TrustedHosts list with Powershell as admin privileges.

Set-Item WSMan:\localhost\Client\TrustedHosts -Value 'machineA,machineB'

Note: The command above may fail if run on Powershell

Then run the following command to view computers in the TrustedHosts list:

Get-Item WSMan:\localhost\Client\TrustedHosts

Refer to this and this

Nancy
  • 26,865
  • 3
  • 18
  • 34