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.

  1. On the remote computer, open the PowerShell console.
  2. Execute this command: Set-PSSessionConfiguration Microsoft.Powershell -ShowSecurityDescriptorUI -Force
  3. When the Permissions dialog box appears, enable Full Control under the Permissions for Everyone group, and select Allow.
  4. Ensure that the group containing the polling user can access PowerShell, and click OK.
  5. Verify all permissions are set and saved.

Resolving 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. You can download PowerShell 2.0 or later from https://docs.microsoft.com/en-us/powershell (@2018 Microsoft Corp. Link obtained on July 23, 2018.)

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:

  1. In Notepad, copy and paste the following text:
    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine]

    "ApplicationBase"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0"

    "PSCompatibleVersion"="1.0, 2.0"

    "RuntimeVersion"="v2.0.50727"

    "ConsoleHostAssemblyName"="Microsoft.PowerShell.ConsoleHost, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=msil"

    "ConsoleHostModuleName"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Microsoft.PowerShell.ConsoleHost.dll"

    "PowerShellVersion"="X.0"

  1. Update the PowerShellVersion variable in the last line.
  2. Save the file as PowerShellv1.reg and then double-click it to add it to the registry. (A reboot may be required.)