How do I set up a remote PowerShell session with Exchange 2010+?
Remote PowerShell in Exchange Server 2010, 2013, or 2016 enables you to manage your Exchange server from a remote computer, either on your local area network or over the Internet.
- If you are performing a Public Folder migration using MigrationWiz, and remote PowerShell is enabled on the Destination, then MigrationWiz can automatically mail enable your Public Folders, during your migration.
- Remote PowerShell does not need to be enabled on the Source environment. It only needs to be enabled on the Destination.
- Remote PowerShell is automatically enabled on Office 365, so, if your Destination is Office 365, then these steps are not required.
Follow these setup steps if your Destination is local or Hosted Exchange (but not Office 365), and you want to mail enable the Public Folders on the Destination, as part of the migration.
- Log in to your Exchange 2010+ server, and enable the Windows Authentication on the PowerShell site:
- Open “Internet Information Services (IIS) Manager” console.
- Connect to the Exchange Server.
- Open: Sites -> “Name of your Exchange Site” -> PowerShell.
- Open Authentication.
- Enable Windows Authentication.
- Enable remote PowerShell for the administrator account specified in your MigrationWiz project:
Set-User MigrationWiz -RemotePowerShellEnabled $True
Note: Change the user account: MigrationWiz to equal the name of the admin account that you are using with your MigrationWiz project.
To connect to the remote PowerShell of the Exchange 2010, 2013, 2016 or Exchange Online server from a remote computer/client (this is what MigrationWiz automatically would do to mail enable Public Folders during the migration process):
- Check the installation requirements for Exchange Server 2010, for Exchange Server 2013 and for Exchange Online (Office 365).
- Run a Windows PowerShell as administrator.
- Set the execution policy settings to RemoteSigned Set-ExecutionPolicy RemoteSigned
- Provide the target server administrator credentials $cred = get-credential
- Configure the connection:
- If connecting to Exchange 2010, 2013, or 2016, run $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://<ServerName>/Powershell -Credential $cred
where <ServerName> is the NetBIOS name or FQDN of the Exchange server you are remoting into.
- If connecting to Exchange Online (Office 365), run $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/Powershell/ -Credential $cred -Authentication Basic -AllowRedirection