Code Monkey home page Code Monkey logo

office-typelib-remediation's Introduction

Office TypeLib Remediation

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.

In this repository

  • Remediate-OfficeTypeLib.ps1

    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.

Importing the Configuration Baseline

  1. Download the latest version of the Remediation for Orphaned Office TypeLib Keys.cab.
  2. Open the Configuration Manager console.
  3. From the Assets and Compliance workspace, expand Compliance Settings.
  4. Right-click on Configuration Baselines and select Import Configuration Data.
  5. On the Import Configuration Data Wizard, click Add and select Remediation for Orphaned Office TypeLib Keys.cab.
  6. Click Yes on the publisher notification.
  7. With the baseline selected, click Next.
  8. 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
  9. On the Confirmation page, click Close.

Automatic Baseline Remediation

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.

Deploying the Configuration Baseline

  1. From the Assets and Compliance workspace, expand Compliance Settings > Configuration Baselines.
  2. Right-click on the new baseline and select Deploy.
  3. 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.

Logging

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.

PowerShell Execution Policy

The PowerShell scripts are provided as-is and are not signed as part of this offering. Before deploying either resource, consider the following options:

License

Code licensed under the MIT License.

Contributing

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.

Trademarks

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.

office-typelib-remediation's People

Contributors

bobclements-msft avatar microsoftopensource avatar microsoft-github-operations[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.