Difference between revisions of "Creating a PSCredential object"

From MyWiki
Jump to: navigation, search
(Created page with "<source="text"> $secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force $mycreds = New-Object System.Management.Automation.PSCredential ("username", $secpa...")
 
(Blanked the page)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<source="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