Skip to content

Does Add-SslCert function work correctly with "netsh show sslcert" command? #862

@denvifer

Description

@denvifer

I have a problem with Azre DevOps Release pipeline which is similar to this issue.

I was investigating this and found quite strange behavior on the following lines of the AppCmdOnTargetMachines module:

$isItSameBinding = $result.Get(4).Contains([string]::Format("{0}:{1}", $hostname, $port))

...

$isItSameBinding = $result.Get(4).Contains([string]::Format("{0}:{1}", $ipAddress, $port))

...

$isItSameCert = $result.Get(5).ToLower().Contains($certhash.ToLower())

In my environment this checking always returns false. But if i replace $result.Get(4) to $result.Get(6) and $result.Get(5) to $result.Get(7), similar ps script works correctly.
And in fact i see that in the "netsh show sslcert" output needed data are located on lines 6 and 7, but not 4 and 5. Is it possible that the command output was changed?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions