【发布时间】:2020-04-12 06:26:43
【问题描述】:
我正在尝试使用以下代码在 azure 中使用 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 门户的自动化 DSC 中尝试这个。
-
这只适用于本地(因为您使用的是
start-dscconfiguration),那么您到底在做什么? -
我的要求是使用 DSC 安装 Google chrome
标签: azure azure-virtual-machine dsc