Untitled

in Powershell remoting we have tow types one-to-one and one-to-many

#useful commandlets
New-PSSession
Enter-PSSession

first of all we need to enable ps remoting (we must have admin privs)

Enable-PSRemoting

Untitled

now let’s enter a ps session

Enter-PSSession -ComputerName WIN-Q4788GPE9L7

Untitled

as we see we are logged in at the machine win-q4 and we can execute commands on it

$sess = New-PSSession -ComputerName WIN-Q4788GPE9L7

Untitled

we will use the sess variable to hold the session for us now let’s list it

$sess

Untitled

now let’s login using this session

Enter-PSSession -Session $sess

Untitled

now moving on to the one-to-many powershell remoting (Fan-Out-Remoting)

Untitled