Skip to content

Commit 8ec7663

Browse files
committed
Set-DbaNetworkCertificate - Take the thumbprint raw from the remote scriptblock in the test
Invoke-Command2 wraps plain output in a PSCustomObject unless -Raw is used, so the CNG test handed the command an object with a Length property instead of the thumbprint and failed on the thumbprint format check. (do *NetworkCertificate*)
1 parent 9b18dc9 commit 8ec7663

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/Set-DbaNetworkCertificate.Tests.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Describe $CommandName -Tag IntegrationTests {
8181
ComputerName = $computerName
8282
ScriptBlock = $newCngCertificate
8383
ArgumentList = $computerName
84+
# Raw, because Invoke-Command2 otherwise wraps the string in an object that only has a Length.
85+
Raw = $true
8486
}
8587
$cngThumbprint = Invoke-Command2 @splatCreateCng
8688
$script:createdNetworkCertificateThumbprints += $cngThumbprint

0 commit comments

Comments
 (0)