In some circumstances, devices that have had a previously installed 32-bit Office version may have leftover registry keys that interfere with COM and .NET functionality with a 64-bit Office version. Generally, these issues occur when the COM or .NET client is running as a 32-bit process. This project addresses remediation for these COM and .NET issues between 32-bit and 64-bit versions of Office.
-
This PowerShell script scans the registry for TypeLib keys (HKLM:\Software\WOW6432Node\Classes\TypeLib\ and HKLM:\Software\Classes\TypeLib) for orphaned values and removes them. By default this script will run in ScanOnly mode, preventing automatic remediation. To enable remedation, set the ScanOnly parameter to $false. For example: .\Remediate-OfficeTypeLib.ps1 -ScanOnly:$false
-
Remediate-OfficeInterfaces.ps1
This PowerShell script scans the registry for Interface keys (HKLM:\Software\WOW6432Node\Classes\Interface) for corrupted (empty) values and removes them. By default this script will run in ScanOnly mode, preventing automatic remediation. To enable remedation, set the ScanOnly parameter to $false. For example: .\Remediate-OfficeInterfaces.ps1 -ScanOnly:$false
-
Configuration Baseline: Remediation for Orphaned Office TypeLib Keys.cab
The Configuration Baseline is a variation of the standalone PowerShell script, adjusted to meet the requirements for Microsoft Endpoint Configuration Manager. Once imported into Configuration Manager, the baseline can be deployed in "Monitor" mode (non-remediation) to identify devices that have orphaned TypeLib registry keys. With remediation enabled, the baseline will remove all known orphaned keys from the affected devices.
- Download the latest version of the Remediation for Orphaned Office TypeLib Keys.cab.
- Open the Configuration Manager console.
- From the Assets and Compliance workspace, expand Compliance Settings.
- Right-click on Configuration Baselines and select Import Configuration Data.
- On the Import Configuration Data Wizard, click Add and select Remediation for Orphaned Office TypeLib Keys.cab.
- Click Yes on the publisher notification.
- With the baseline selected, click Next.
- On the Summary page, confirm the Configuration Baseline and Configuration Items match the following list. Click Next to complete the import.
- Configuration Baselines (1)
- Remediation for Orphaned Office TypeLib Keys
- Configuration Items (1)
- Microsoft 365 Apps - Office TypeLib Remediation
- Configuration Baselines (1)
- On the Confirmation page, click Close.
The following configuration item contains a remediation script:
- Microsoft 365 Apps - Office TypeLib Remediation
With remediation enabled, the script will remove all known orphaned Office TypeLib registry keys.
- From the Assets and Compliance workspace, expand Compliance Settings > Configuration Baselines.
- Right-click on the new baseline and select Deploy.
- On the deployment dialog window, select the appropriate values and click OK.
- Check the boxes for automatic remediation as appropriate for your environment. Consider deploying without remediation first to monitor impacted devices, then enable remediation after 1-2 days.
- Select the device collection containing devices that require detection and remediation.
- Set the deployment schedule appropriately for your environment.
All PowerShell scripts will log output to: %windir%\Temp*.log. This can be changed using the LogFile parameter. For example: .\Remediate-OfficeInterfaces.ps1 -LogFile C:\OfficeInterfaces.log.
The PowerShell scripts are provided as-is and are not signed as part of this offering. Before deploying either resource, consider the following options:
- Sign the PowerShell scripts before deployment.
- For the Configuration Manager, configure the PowerShell execution policy in Client Settings to bypass script signing requirements.
Code licensed under the MIT License.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.