1. Aaron Jensen
  2. Carbon
  3. Issues
Issue #219 resolved

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

Anonymous 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)

From:

$passwordArgValue = $Credential.GetNetworkCredential().Password

To:

$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