AL/Get-CredentialFromEnvironmentJson.ps1
<# .Synopsis Gets the credential from settings.json .Description Gets credentials from settings.json .Parameter SourcePath Path to the current project .Example $secureCred = Get-CredentialFromEnvironmentJson #> function Get-CredentialFromEnvironmentJson { return New-Object System.Management.Automation.PSCredential((Get-Secret -secretName "Username"), (ConvertTo-SecureString (Get-Secret -secretName "Password") -AsPlainText -Force)) } |