Introducing Microsoft PowerShell

6/9

Key concepts: PowerShell Remoting

Source:  Microsoft

PowerShell remoting is the ability to run interactive sessions or scripts on remote machines without needing a full remote desktop. It is similar to using SSH (Secure Shell) on Linux to manage a remote server.

PowerShell remoting uses the concept of sessions. The Enter-PSSession cmdlet starts a new session, which may be local or remote. You can use Enter-PSSession with the -computer argument to start a new interactive session on the specified computer. Another approach is to create a new session variable using the New-PSSession cmdlet, and then use Import-PSSession to let you use cmdlets that execute remotely. Import-PSSession does not import cmdlets that already exist in the local session, unless you use the AllowClobber parameter. Connections to Exchange Online normally use Import-PSSession.

You can also connect to Azure AD, the Office 365 directory, using the special cmdlet Connect-MsolService; or for the most recent Azure AD module, Connect-AzureAD.

Until recently, PowerShell remoting by default only worked with administrator credentials on the remote computer, as well as requiring Windows Remote Management (WinRM). With Server 2016, Microsoft introduced Just Enough Administration (JEA) which lets you specify users and roles so that full administration rights are not required.

View All Photo Stories
CIO
Security
Networking
Data Center
Data Management
Close