powershell - Start-DscConfiguration 无法连接服务器机器

标签 powershell dsc

我正在尝试针对远程计算机运行我的 DSC 配置,但最终出现以下错误

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

服务器运行 WinRM 服务并配置为通过 HTTPS 运行。客户端机器可以使用 Enter-PSSession 命令成功连接到远程机器。

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

关于我在这里可能遗漏的任何想法?

最佳答案

只是在一些 tweeps 的帮助下弄明白了。我必须创建一个带有 -UseSSL 标志的 CimSession 并将该 session 传递给 Start-DscConfiguration 命令。 Start-DscConfiguration 本身没有 -UseSSL 选项。不需要目标上的任何 DSC 服务来推送配置。

关于powershell - Start-DscConfiguration 无法连接服务器机器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28119696/

相关文章:

powershell - 使用 Powershell DSC 安装 JRE 挂起

ssl - DSC - 客户端错误 - 无法获取私钥

c# - 如何使用与其他 DLR 语言类似的 API 在 c# 应用程序中托管 PowerShell 3.0

powershell - 如何调整 VSCode 对 PowerShell 的支持——更好地处理引号的输入

powershell - 通过引用访问列表的问题

powershell - 导出当前 DSC 配置以导入到另一台服务器(以 IIS 网站为例)

powershell - 无法执行 DSC 配置文件

c# - 在执行每个管道命令后在 C# 中捕获 PowerShell 输出

powershell - VSTS 任务组 Powershell 参数

powershell - 自定义资源 : Is it okay to reapply settings every time?