Open a PSSession
How to run commands including PowerShell commands on a remote machine using PSsession
An alternative way to run commands remotely you can open a PS Session to a remote machine. What ever you type in the PS Session command prompt will run on the remote machine.
• Create a session (New-PSSession)
• Use the session (Enter-PSSession)
• Leave the session (Exit-PSSession or simply Exit)
• Close the session (Remove-PSSession)
Kam is a Azure and Microsoft Modern Desktop Certified Administrator and Udemy Intructor. He is a solution architect and served clients ranging from educational, private and government establishments in the UK. Kam has worked within the IT industry for the last 7 years building his experience over a variety of products such as DirectAccess, Always On VPN, SCCM, Hyper-V and now focusing on Azure and Modern Desktop/Mobile Device Management.