Windows-powershell / PowerShell-master /test /powershell /Modules /Microsoft.PowerShell.Utility /ConvertTo-SecureString.Tests.ps1
Download PowerShell-master/test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-SecureString.Tests.ps1 from MegaBites-AI/Windows-powershell: direct link, hf CLI and curl.
- Browser
- Download file 669 Bytes
-
https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-SecureString.Tests.ps1
- Command line
-
hf download hf://datasets/MegaBites-AI/Windows-powershell/PowerShell-master/test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-SecureString.Tests.ps1
-
curl -L -o ConvertTo-SecureString.Tests.ps1 https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-SecureString.Tests.ps1
669 Bytes
| # Copyright (c) Microsoft Corporation. | |
| # Licensed under the MIT License. | |
| [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] | |
| param() | |
| Describe "ConvertTo--SecureString" -Tags "CI" { | |
| Context "Checking return types of ConvertTo--SecureString" { | |
| It "Should return System.Security.SecureString after converting plaintext variable"{ | |
| #[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Demo/doc/test secret.")] | |
| $PesterTestConvert = (ConvertTo-SecureString "plaintextpester" -AsPlainText -Force) | |
| $PesterTestConvert | Should -BeOfType securestring | |
| } | |
| } | |
| } | |