Powershell - Failed to enumerate SSL bindings, error code 234
来源:互联网 发布:仿真化学实验室软件 编辑:程序博客网 时间:2024/06/05 17:08
同一段PowerShell发现在两台不同机器执行,执行的结果却不一样,一台上执行成功,一台上则失败。这段代码如下,它是用来获取本机的 0.0.0.0!4466 SSL Binding 信息。通过MS技术的帮助,发现出问题的原因在于注册表HKLM\System\Currentcontrolset\services\http\parameters\sslbindinginfo下的条目中的SSLCertStoreName 键 。在有多个条目的情况下,如果仅有开始的条目没有该键,就会出这样的问题。解决的办法就是,将缺失的SSLCertStoreName 键补上,或者移除所有条目中的SSLCertStoreName 键。
Set-ExecutionPolicy remotesigned
Import-Module WebAdministration
cd IIS:\SslBindings
Get-Item 0.0.0.0!4466
使用Trace-Command cmdlet在两台不同机器上的跟踪如下:
(1) 运行正确机器上显示的结果
Trace-Command -Name ParameterBinding -Option All -Expression { Get-Item 0.0.0.0!4466 } -PSHost
DEBUG: ParameterBinding Information: 0 : BIND NAMED cmd line args [Get-Item]
DEBUG: ParameterBinding Information: 0 : BIND POSITIONAL cmd line args [Get-Item]
DEBUG: ParameterBinding Information: 0 : BIND arg [0.0.0.0!4466] to parameter [Path]
DEBUG: ParameterBinding Information: 0 : Binding collection parameter Path: argument type [String], parameter type [System.String[]], collection type Array, element type [S
ystem.String], no coerceElementType
DEBUG: ParameterBinding Information: 0 : Creating array with element type [System.String] and 1 elements
DEBUG: ParameterBinding Information: 0 : Argument type String is not IList, treating this as scalar
DEBUG: ParameterBinding Information: 0 : Adding scalar element of type String to array position 0
DEBUG: ParameterBinding Information: 0 : BIND arg [System.String[]] to param [Path] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : BIND cmd line args to DYNAMIC parameters.
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [Get-Item]
DEBUG: ParameterBinding Information: 0 : CALLING BeginProcessing
DEBUG: ParameterBinding Information: 0 : CALLING EndProcessing
(2) 运行正确机器上显示的结果
Trace-Command -Name ParameterBinding -Option All -Expression { Get-Item 0.0.0.0!4466} -PSHost
DEBUG: ParameterBinding Information: 0 : BIND NAMED cmd line args [Get-Item]
DEBUG: ParameterBinding Information: 0 : BIND POSITIONAL cmd line args [Get-Item]
DEBUG: ParameterBinding Information: 0 : BIND arg [0.0.0.0!4466] to parameter [Path]
DEBUG: ParameterBinding Information: 0 : Binding collection parameter Path: argument type [String], parameter type [System.String[]], collection type Array,
element type [System.String], no coerceElementType
DEBUG: ParameterBinding Information: 0 : Creating array with element type [System.String] and 1 elements
DEBUG: ParameterBinding Information: 0 : Argument type String is not IList, treating this as scalar
DEBUG: ParameterBinding Information: 0 : Adding scalar element of type String to array position 0
DEBUG: ParameterBinding Information: 0 : BIND arg [System.String[]] to param [Path] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : BIND cmd line args to DYNAMIC parameters.
DEBUG: ParameterBinding Information: 0 : BIND PIPELINE object to parameters: [Out-Default]
DEBUG: ParameterBinding Information: 0 : PIPELINE object TYPE = [System.Management.Automation.ErrorRecord]
DEBUG: ParameterBinding Information: 0 : RESTORING pipeline parameter's original values
DEBUG: ParameterBinding Information: 0 : Parameter [InputObject] PIPELINE INPUT ValueFromPipeline NO COERCION
DEBUG: ParameterBinding Information: 0 : BIND arg [Cannot retrieve the dynamic parameters for the cmdlet. Failed to enumerate SSL bindings, error code 234.] to p
arameter [InputObject]
DEBUG: ParameterBinding Information: 0 : BIND arg [Cannot retrieve the dynamic parameters for the cmdlet. Failed to enumerate SSL bindings, error code 234.]
to param [InputObject] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [Out-Default]
DEBUG: ParameterBinding Information: 0 : BIND NAMED cmd line args [Out-LineOutput]
DEBUG: ParameterBinding Information: 0 : BIND arg [Microsoft.PowerShell.Commands.Internal.Format.ConsoleLineOutput] to parameter [LineOutput]
DEBUG: ParameterBinding Information: 0 : COERCE arg to [System.Object]
DEBUG: ParameterBinding Information: 0 : Parameter and arg types the same, no coercion is needed.
DEBUG: ParameterBinding Information: 0 : BIND arg [Microsoft.PowerShell.Commands.Internal.Format.ConsoleLineOutput] to param [LineOutput] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : BIND POSITIONAL cmd line args [Out-LineOutput]
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [Out-LineOutput]
DEBUG: ParameterBinding Information: 0 : CALLING BeginProcessing
DEBUG: ParameterBinding Information: 0 : BIND PIPELINE object to parameters: [Out-LineOutput]
DEBUG: ParameterBinding Information: 0 : PIPELINE object TYPE = [System.Management.Automation.ErrorRecord]
DEBUG: ParameterBinding Information: 0 : RESTORING pipeline parameter's original values
DEBUG: ParameterBinding Information: 0 : Parameter [InputObject] PIPELINE INPUT ValueFromPipeline NO COERCION
DEBUG: ParameterBinding Information: 0 : BIND arg [Cannot retrieve the dynamic parameters for the cmdlet. Failed to enumerate SSL bindings, error code 234.] to p
arameter [InputObject]
DEBUG: ParameterBinding Information: 0 : BIND arg [Cannot retrieve the dynamic parameters for the cmdlet. Failed to enumerate SSL bindings, error code 234.]
to param [InputObject] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [out-lineoutput]
DEBUG: ParameterBinding Information: 0 : BIND NAMED cmd line args [Format-Default]
DEBUG: ParameterBinding Information: 0 : BIND POSITIONAL cmd line args [Format-Default]
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [Format-Default]
DEBUG: ParameterBinding Information: 0 : CALLING BeginProcessing
DEBUG: ParameterBinding Information: 0 : BIND PIPELINE object to parameters: [Format-Default]
DEBUG: ParameterBinding Information: 0 : PIPELINE object TYPE = [System.Management.Automation.ErrorRecord]
DEBUG: ParameterBinding Information: 0 : RESTORING pipeline parameter's original values
DEBUG: ParameterBinding Information: 0 : Parameter [InputObject] PIPELINE INPUT ValueFromPipeline NO COERCION
DEBUG: ParameterBinding Information: 0 : BIND arg [Cannot retrieve the dynamic parameters for the cmdlet. Failed to enumerate SSL bindings, error code 234.] to p
arameter [InputObject]
DEBUG: ParameterBinding Information: 0 : BIND arg [Cannot retrieve the dynamic parameters for the cmdlet. Failed to enumerate SSL bindings, error code 234.]
to param [InputObject] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [format-default]
DEBUG: ParameterBinding Information: 0 : BIND NAMED cmd line args [Set-StrictMode]
DEBUG: ParameterBinding Information: 0 : BIND arg [1] to parameter [Version]
DEBUG: ParameterBinding Information: 0 : Executing DATA GENERATION metadata: [Microsoft.PowerShell.Commands.SetStrictModeCommand+ArgumentToVersionTransformat
ionAttribute]
DEBUG: ParameterBinding Information: 0 : result returned from DATA GENERATION: 1.0
DEBUG: ParameterBinding Information: 0 : COERCE arg to [System.Version]
DEBUG: ParameterBinding Information: 0 : Parameter and arg types the same, no coercion is needed.
DEBUG: ParameterBinding Information: 0 : Executing VALIDATION metadata: [Microsoft.PowerShell.Commands.SetStrictModeCommand+ValidateVersionAttribute]
DEBUG: ParameterBinding Information: 0 : BIND arg [1.0] to param [Version] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : BIND POSITIONAL cmd line args [Set-StrictMode]
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [Set-StrictMode]
DEBUG: ParameterBinding Information: 0 : CALLING BeginProcessing
DEBUG: ParameterBinding Information: 0 : CALLING EndProcessing
DEBUG: ParameterBinding Information: 0 : BIND NAMED cmd line args [Set-StrictMode]
DEBUG: ParameterBinding Information: 0 : BIND arg [1] to parameter [Version]
DEBUG: ParameterBinding Information: 0 : Executing DATA GENERATION metadata: [Microsoft.PowerShell.Commands.SetStrictModeCommand+ArgumentToVersionTransformat
ionAttribute]
DEBUG: ParameterBinding Information: 0 : result returned from DATA GENERATION: 1.0
DEBUG: ParameterBinding Information: 0 : COERCE arg to [System.Version]
DEBUG: ParameterBinding Information: 0 : Parameter and arg types the same, no coercion is needed.
DEBUG: ParameterBinding Information: 0 : Executing VALIDATION metadata: [Microsoft.PowerShell.Commands.SetStrictModeCommand+ValidateVersionAttribute]
DEBUG: ParameterBinding Information: 0 : BIND arg [1.0] to param [Version] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : BIND POSITIONAL cmd line args [Set-StrictMode]
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [Set-StrictMode]
DEBUG: ParameterBinding Information: 0 : CALLING BeginProcessing
DEBUG: ParameterBinding Information: 0 : CALLING EndProcessing
DEBUG: ParameterBinding Information: 0 : BIND NAMED cmd line args [Set-StrictMode]
DEBUG: ParameterBinding Information: 0 : BIND arg [1] to parameter [Version]
DEBUG: ParameterBinding Information: 0 : Executing DATA GENERATION metadata: [Microsoft.PowerShell.Commands.SetStrictModeCommand+ArgumentToVersionTransformat
ionAttribute]
DEBUG: ParameterBinding Information: 0 : result returned from DATA GENERATION: 1.0
DEBUG: ParameterBinding Information: 0 : COERCE arg to [System.Version]
DEBUG: ParameterBinding Information: 0 : Parameter and arg types the same, no coercion is needed.
DEBUG: ParameterBinding Information: 0 : Executing VALIDATION metadata: [Microsoft.PowerShell.Commands.SetStrictModeCommand+ValidateVersionAttribute]
DEBUG: ParameterBinding Information: 0 : BIND arg [1.0] to param [Version] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : BIND POSITIONAL cmd line args [Set-StrictMode]
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [Set-StrictMode]
DEBUG: ParameterBinding Information: 0 : CALLING BeginProcessing
DEBUG: ParameterBinding Information: 0 : CALLING EndProcessing
DEBUG: ParameterBinding Information: 0 : BIND NAMED cmd line args [Set-StrictMode]
DEBUG: ParameterBinding Information: 0 : BIND arg [1] to parameter [Version]
DEBUG: ParameterBinding Information: 0 : Executing DATA GENERATION metadata: [Microsoft.PowerShell.Commands.SetStrictModeCommand+ArgumentToVersionTransformat
ionAttribute]
DEBUG: ParameterBinding Information: 0 : result returned from DATA GENERATION: 1.0
DEBUG: ParameterBinding Information: 0 : COERCE arg to [System.Version]
DEBUG: ParameterBinding Information: 0 : Parameter and arg types the same, no coercion is needed.
DEBUG: ParameterBinding Information: 0 : Executing VALIDATION metadata: [Microsoft.PowerShell.Commands.SetStrictModeCommand+ValidateVersionAttribute]
DEBUG: ParameterBinding Information: 0 : BIND arg [1.0] to param [Version] SUCCESSFUL
DEBUG: ParameterBinding Information: 0 : BIND POSITIONAL cmd line args [Set-StrictMode]
DEBUG: ParameterBinding Information: 0 : MANDATORY PARAMETER CHECK on cmdlet [Set-StrictMode]
DEBUG: ParameterBinding Information: 0 : CALLING BeginProcessing
DEBUG: ParameterBinding Information: 0 : CALLING EndProcessing
Get-Item : Cannot retrieve the dynamic parameters for the cmdlet. Failed to enumerate SSL bindings, error code 234.
At line:4 char:72
+ Trace-Command -Name ParameterBinding -Option All -Expression { Get-Item <<<< 0.0.0.0!4466 } -PSHost
+ CategoryInfo : InvalidArgument: (:) [Get-Item], ParameterBindingException
+ FullyQualifiedErrorId : GetDynamicParametersException,Microsoft.PowerShell.Commands.GetItemCommand
- Powershell - Failed to enumerate SSL bindings, error code 234
- Custom tool error Failed to generate code
- failed to create jvm error code -4
- IDEA无法启动:Failed to create JVM:error code -4
- Android Studio failed to create jvm error code -4
- IDEA无法启动:Failed to create JVM:error code -1
- AndroidStudio Failed to create JVM:error code -4错误
- 安装composer时Warning: readfile(): SSL operation failed with code 1. OpenSSL Error messages:
- linux svn SSL handshake failed: SSL error
- IntelliJ IDEA中Push failed: Failed with error: unable to access xx:Unknown SSL protocol error in
- Failed to initialize the PowerShell host 解决方案
- Error:error: linker command failed with exit code 1 (use -v to see invocation)
- Error:error: linker command failed with exit code 1 (use -v to see invocation)
- Error launching Android Studio: Failed to create JVM: error code-1解决办法
- Android - WebView 加载 Https 出现 SSL Error. Failed to validate the certificate chain
- error LNK1257: code generation failed
- 设置git代理:转:解决Unknown SSL protocol error in connection to code.google.com:443
- Failed to code sign "xxxxx"
- Linux的rm命令
- Android ListView入门(二)
- 电子邮箱的判定方法
- 算法——穷举
- Windows下搭建QTCreator、minGW
- Powershell - Failed to enumerate SSL bindings, error code 234
- "_OBJC_CLASS_$_Play", referenced from:
- [IPhone开发]发送Http请求(POST GET)的方法 [IPhone开发]发送Http请求(POST GET)的方法
- 一条命令轻松搭建Ubuntu c\C++基本开发环境
- Android 中 XmlPullParser 读写 XML 的方法
- nsis安装包(一)_前言
- UItableView cell 自适应高度
- ztree实例
- Android系统源代码情景分析:基础知识