Enable-PSRemoting -Force # on the target (elevated); allows WinRM
Enter-PSSession -ComputerName srv1 # interactive
Invoke-Command -ComputerName srv1,srv2 -ScriptBlock { Get-Service wuauserv }
$s = New-PSSession -ComputerName srv1; Invoke-Command $s { hostname }; Remove-PSSession $s
Enter-PSSession -HostName ubuntu-host -UserName alice # PowerShell 7 over SSH
On a domain, Kerberos handles authentication; for machines outside a domain you must configure TrustedHosts or use HTTPS/SSH transport. Open firewall access only for management networks. Use the least privileged account that can do the job, and prefer SSH keys for Linux targets.