Difference between revisions of "Creating a PSCredential object"

From MyWiki
Jump to: navigation, search
(Blanked the page)
 
Line 1: Line 1:
<source lang="text">
 
$secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force
 
$mycreds = New-Object System.Management.Automation.PSCredential ("username", $secpasswd)
 
  
You can now pass $mycreds to any -PSCredential input parameter
 
</source>
 

Latest revision as of 11:00, 22 February 2019