如何在Azure中使用所需状态配置(DSC)在VM中安装Google chrome?

问题描述 投票:0回答:1

我正在尝试下面的代码,以天蓝色使用DSC安装Google Chrome。

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

但是无法安装并出现以下错误。

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

谁能帮我解决问题/

azure azure-virtual-machine dsc
1个回答
0
投票

通过在VM上运行“ winrm枚举winrm / config / listener”来验证winrm侦听器。如果它不起作用,请确保您启用了winrm并通过https

进行侦听
© www.soinside.com 2019 - 2024. All rights reserved.