July 2018
Beginner
552 pages
13h 18m
English
There are three types of remoting: Interactive (or 1:1), Fan-Out (or 1:n), and Implicit. Interactive remoting is usually used when troubleshooting issues interactively. One session can be entered, and you can interactively run commands in it; when you are done, the session is torn down:
# Interactive, 1:1# Session is created, used interactively and exitedEnter-PSSession -ComputerName Machine1Get-HostExit-PSSession# 1:n$sessions = New-PSSession -ComputerName Machine1,Machine2,MachineN# Persistent sessions, Invoke-Command uses 32 parallel connections# Can be controlled with ThrottleLimitInvoke-Command -Session $sessions -ScriptBlock { $variable = "value"}# Persistent sessions can be used multiple times until the idle timeout ...Read now
Unlock full access