Last active
July 25, 2019 16:29
-
-
Save MartinMiles/921d125ec9f784923575f38803b1817f to your computer and use it in GitHub Desktop.
This is a sample of WinRm code execution in a context of remote machine
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
$pass = ConvertTo-SecureString -AsPlainText '123' -Force | |
$Cred = New-Object System.Management.Automation.PSCredential -ArgumentList 'Martin',$pass | |
Invoke-Command -ComputerName 192.168.173.14 -ScriptBlock { Get-ChildItem C:\ } -credential $Cred |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment