Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

powershell credential object

# Define clear text string for username and password
[string]$userName = 'MyUserName'
[string]$userPassword = 'MySuperSecurePassword'

# Convert to SecureString
[securestring]$secStringPassword = ConvertTo-SecureString $userPassword -AsPlainText -Force
Source by pscustomobject.github.io #
 
PREVIOUS NEXT
Tagged: #powershell #credential #object
ADD COMMENT
Topic
Name
7+3 =