Skip to content
12 changes: 12 additions & 0 deletions es-metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
schemaVersion: 1.0.0
providers:
- provider: InventoryAsCode
version: 1.0.0
metadata:
isProduction: true
accountableOwners:
service: cef1de07-99d6-45df-b907-77d0066032ec
routing:
defaultAreaPath:
org: msazure
path: One\MGMT\Compute\Powershell\Powershell
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.300",
"version": "8.0.318",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
10 changes: 5 additions & 5 deletions test/Microsoft.PowerShell.SecretStore.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Describe "Test Microsoft.PowerShell.SecretStore module" {
}

It "Verifies Unlock-SecretStore throws expected error when in no password mode" {
$token = ConvertTo-SecureString -String "None" -AsPlainText -Force
$token = [System.Net.NetworkCredential]::new('', 'None').SecurePassword
{ Unlock-SecretStore -Password $token } | Should -Throw -ErrorId 'InvalidOperation,Microsoft.PowerShell.SecretStore.UnlockSecretStoreCommand'
}
}
Expand Down Expand Up @@ -329,7 +329,7 @@ Describe "Test Microsoft.PowerShell.SecretStore module" {
BeforeAll {
$secretName = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName())
$randomSecret = [System.IO.Path]::GetRandomFileName()
$secureStringToWrite = ConvertTo-SecureString -String $randomSecret -AsPlainText -Force
$secureStringToWrite = [System.Net.NetworkCredential]::new('', $randomSecret).SecurePassword
$errorMsg = ""
}

Expand Down Expand Up @@ -395,7 +395,7 @@ Describe "Test Microsoft.PowerShell.SecretStore module" {
}

It "Verifies PSCredential type write to SecretStore" {
$cred = [pscredential]::new('UserL', (ConvertTo-SecureString $randomSecret -AsPlainText -Force))
$cred = [pscredential]::new('UserL', ([System.Net.NetworkCredential]::new('', $randomSecret).SecurePassword))
$success = [Microsoft.PowerShell.SecretStore.LocalSecretStore]::GetInstance().WriteObject(
$secretName,
$cred,
Expand Down Expand Up @@ -462,8 +462,8 @@ Describe "Test Microsoft.PowerShell.SecretStore module" {
$ht = @{
Blob = ([byte[]] @(1,2))
Str = "TestHashtableString"
SecureString = (ConvertTo-SecureString $randomSecretA -AsPlainText -Force)
Cred = ([pscredential]::New("UserA", (ConvertTo-SecureString $randomSecretB -AsPlainText -Force)))
SecureString = ([System.Net.NetworkCredential]::new('', $randomSecretA).SecurePassword)
Cred = ([pscredential]::New("UserA", ([System.Net.NetworkCredential]::new('', $randomSecretB).SecurePassword)))
}

$success = [Microsoft.PowerShell.SecretStore.LocalSecretStore]::GetInstance().WriteObject(
Expand Down
Loading