Commit ed4fd2cf authored by Olivier De Marchi's avatar Olivier De Marchi
Browse files

bug in var AgentCredential

parent 86946332
...@@ -123,7 +123,7 @@ Function TweakUninstallKasperskyEndpoint { # RESINFO ...@@ -123,7 +123,7 @@ Function TweakUninstallKasperskyEndpoint { # RESINFO
# Batch - encrypted (blurred) password # Batch - encrypted (blurred) password
$AgentCryptPassword = $($Global:SWMB_Custom.KesAgentPass) | ConvertTo-SecureString -Key (Get-Content $($Global:SWMB_Custom.KesKeyFile)) $AgentCryptPassword = $($Global:SWMB_Custom.KesAgentPass) | ConvertTo-SecureString -Key (Get-Content $($Global:SWMB_Custom.KesKeyFile))
$AgentCredential = New-Object System.Management.Automation.PsCredential($($Global:SWMB_Custom.KesLogin),$AgentCryptPassword) $AgentCredential = New-Object System.Management.Automation.PsCredential($($Global:SWMB_Custom.KesLogin),$AgentCryptPassword)
$AgentPlainPassword = $Credential.GetNetworkCredential().Password $AgentPlainPassword = $AgentCredential.GetNetworkCredential().Password
} ElseIf ($($Global:SWMB_Custom.KesAgentPass)) { } ElseIf ($($Global:SWMB_Custom.KesAgentPass)) {
# Batch - password defined in clear text # Batch - password defined in clear text
$AgentPlainPassword = $($Global:SWMB_Custom.KesPassword) $AgentPlainPassword = $($Global:SWMB_Custom.KesPassword)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment