Set PowerShell permissions for Exchange
Your organization should internally review and assess to what extent PowerShell is incorporated into your environment. This is especially important when importing scripts from third parties, including content posted by other customers in the SolarWinds online IT community, THWACK. To learn more, see Use PowerShell in SAM.
Certain PowerShell permissions are required for AppInsight for Exchange and the Exchange server.
- On the remote computer, open the PowerShell console.
- Execute this command:
Set-PSSessionConfiguration Microsoft.PowerShell -ShowSecurityDescriptorUI -Force
- When the Permissions dialog box appears, enable Full Control under the Permissions for Everyone group, and select Allow.
- Ensure that the group containing the polling user can access PowerShell, and click OK.
- Verify all permissions are set and saved.
Earlier versions of SAM used FullLanguage mode on target Exchange servers. Starting in SAM 2020.2.6, use RestrictedLanguage as the minimum PSLanguageMode setting in PowerShell on target servers. For a script to configure existing servers, see this Success Center article.
Resolve errors after a reinstall
If PowerShell was installed on Windows Server 2012 with Exchange 2013 and subsequently uninstalled, a Microsoft error removes the required registry key for remote PowerShell to work properly. Security patches or updates may also cause this issue.
SolarWinds strongly recommends that you back up your registry before editing it. Only edit the registry if you are experienced and confident in doing so. Using a registry editor incorrectly can cause serious issues with your operating system, which could require you to reinstall your OS to correct them. SolarWinds cannot guarantee resolutions to any damage resulting from making registry edits.
To recreate the required registry key:
- In a text editor, copy and paste the following text:
Windows Registry Editor Version 5.00
"ConsoleHostAssemblyName"="Microsoft.PowerShell.ConsoleHost, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=msil"
- Update the
PowerShellVersionvariable in the last line.
- Save the file as PowerShellv1.reg and then double-click it to add it to the registry. (A reboot may be required.)