Skip to content

Instantly share code, notes, and snippets.

@JuanRamino
Created November 17, 2021 11:05
Show Gist options
  • Save JuanRamino/52ed78707f3fd4c4e36935adf3c95a92 to your computer and use it in GitHub Desktop.
Save JuanRamino/52ed78707f3fd4c4e36935adf3c95a92 to your computer and use it in GitHub Desktop.
Param(
[Parameter(Mandatory=$true,valueFromPipeline=$true, HelpMessage="Artifactory username")][String] $username,
[Parameter(Mandatory=$true, HelpMessage="Artifactory password")][SecureString]$password
)
$pw = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password))
write-host $username:$pw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment