-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.
Description
Issue comes from Azure/azure-powershell#12264. Below simplified code is hanging. If I use other cmdlet instead of ConvertTo-SecureString, it seems no problem.
Steps to reproduce
[string] $kvName = "<your-kv-name>"
$block = {
param (
[string]
$kvName,
[string]
$secretName,
[string]
$secretValue,
$dummy
)
$stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
Write-Host "Setting secret..."
ConvertTo-SecureString -String secretValue -AsPlainText -Force
Write-Host ("Elapsed time: {0}" -f $stopwatch.Elapsed.ToString())
}
$secretValue = "TopSecret!"
# Uncomment the following line to fix the issue
#$dummy = ConvertTo-SecureString -String secretValue -AsPlainText -Force
Start-Job -ScriptBlock $block -ArgumentList @($kvName, "SecretName1", $secretValue, $dummy) | Receive-Job -Wait -AutoRemoveJobExpected behavior
Actual behavior
Environment data
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.