Last active
January 20, 2020 10:16
-
-
Save amriunix/07d79a3da8c6fbff9fa7408c08b7efc2 to your computer and use it in GitHub Desktop.
Elevate of Privileges (EoP) using powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Username = "Domain\User" | |
$Password = "Pass" | |
$PasswordSS = ConvertTo-SecureString -String $Password -AsPlainText -Force | |
$Creds = New-Object -Typename System.Management.Automation.PSCredential $Username,$PasswordSS | |
Start-Process 'C:\Windows\system32\ping.exe' -ArgumentList '127.0.0.1' -Credential $Creds | |
# Or | |
Invoke-Command -Computer localhost -Credential $Creds -ScriptBlock {C:\Windows\system32\ping.exe 127.0.0.1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment