diff --git a/es-metadata.yml b/es-metadata.yml new file mode 100644 index 0000000..6d8d35a --- /dev/null +++ b/es-metadata.yml @@ -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 diff --git a/global.json b/global.json index ee4995e..72f7879 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.300", + "version": "8.0.318", "rollForward": "latestFeature", "allowPrerelease": false } diff --git a/test/Microsoft.PowerShell.SecretStore.Tests.ps1 b/test/Microsoft.PowerShell.SecretStore.Tests.ps1 index 6d1e964..1694a79 100644 --- a/test/Microsoft.PowerShell.SecretStore.Tests.ps1 +++ b/test/Microsoft.PowerShell.SecretStore.Tests.ps1 @@ -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' } } @@ -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 = "" } @@ -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, @@ -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(