.. / New-PSSession

Creates a persistent connection to a local or remote computer


Functions:
Type:
Toolsets:

Execute

Connect to WinRM

$ps = New-PSSession -ComputerName W10.ad.bitsadmin.com

Comments
Next, for example use Enter-PSSession to interactively enter the session or Invoke-Command to execute a command in the session

Mitre Att&ck
T1021.006


Manage

Manage Microsoft Exchange Server

$ps = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://exch2019.ad.bitsadmin.com/PowerShell/ -Authentication Kerberos

Comments
Might require use of OffensiveDC in case error ERROR_WSMAN_CLIENT_WORKGROUP_NO_KERBEROS is returned on a non-domain joined machine

Mitre Att&ck
T1021.006




Updated: 2023-08-25
Contributor: Arris Huijgen (bitsadmin)