PowerShell Remoting
PS Remoting
#Enable PowerShell Remoting on current Machine (Needs Admin Access)
Enable-PSRemoting
#Entering or Starting a new PSSession (Needs Admin Access)
Enter-PSSession -ComputerName <Name>
#OR
$sess = New-PSSession -ComputerName <Name>
Enter-PSSession -Sessions <SessionName>Remote Code Execution with PS Credentials
$SecPassword = ConvertTo-SecureString '<Wtver>' -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PSCredential('htb.local\<WtverUser>', $SecPassword)
Invoke-Command -ComputerName <WtverMachine> -Credential $Cred -ScriptBlock {whoami}Invoke PowerShell Module & Execute Remotely
Remote Code Execution on Multiple Servers using a Target File
WinRS Executable instead of PSRemoting for Stealth
Last updated