[Community] Install-Service fails to properly escape passwords within Credentials Object

Create issue
Issue #219 resolved
Former user created an issue

Any passwords containing '"' do not work properly when using Install-Service. To fix this issue locally, I changed the following code. (Line 415 of Install-Service.ps1)


$passwordArgValue = $Credential.GetNetworkCredential().Password


$passwordArgValue = ('"{0}"' -f ($Credential.GetNetworkCredential().Password -replace '"', '""'))

This may not be the best way as this only handles escaping quotations.

Comments (3)

  1. Log in to comment