Advertisement
Guest User

Untitled

a guest
Feb 8th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. $user = "jihadinho"
  2. $pass = "qwerty1234" | ConvertTo-SecureString -AsPlainText -Force
  3. $cred = New-Object System.Management.Automation.PSCredential($user,$pass)
  4. Rename-Computer -NewName "WS12" -LocalCredential $cred -Force -Restart
  5.  
  6.  
  7. Start-Process powershell -Verb runas -ArgumentList "-file <file location>"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement