Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. $username = 'user'
  2. $password = 'password'
  3.  
  4. $securePassword = ConvertTo-SecureString $password -AsPlainText -Force
  5. $credential = New-Object System.Management.Automation.PSCredential $username, $securePassword
  6. Start-Process Notepad.exe -Credential $credential
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement