Skip to content

Replace unsafe SCOM connector cleanup script and update article guidance#2046

Open
StoyanChalakov wants to merge 1 commit intoMicrosoftDocs:mainfrom
StoyanChalakov:patch-1
Open

Replace unsafe SCOM connector cleanup script and update article guidance#2046
StoyanChalakov wants to merge 1 commit intoMicrosoftDocs:mainfrom
StoyanChalakov:patch-1

Conversation

@StoyanChalakov
Copy link

This PR fixes and modernizes the Microsoft Learn article for removing old Operations Manager connectors.

The currently published version has multiple problems:

  • It references Microsoft.EnterpriseManagement.OperationsManager.ClientShell.Startup.ps1, which causes an error at script startup in PowerShell.
  • It uses outdated connector handling that does not execute correctly as published.
  • The usage guidance reflects the old script structure and does not match the parameters and behavior needed for safe execution.
  • The article provides too little operational guidance for a destructive maintenance procedure.

This PR updates both the script and the article content.

Script changes

  • Removed the invalid startup script reference.
  • Reworked connector handling to use a working OperationsManager PowerShell / SDK-based approach.
  • Corrected the matching logic so the script safely handles both single-object and multi-object results.
  • Added support for safer execution through named parameters and ShouldProcess, including -WhatIf and -Confirm.
  • Preserved the intended cleanup flow for subscriptions, alert connector associations, uninitialization, and connector removal.

Article changes

  • Reworked the article structure to explain when the procedure should be used and what the script does.
  • Added a dedicated prerequisite section with backup and safety guidance.
  • Replaced the old More information section with Run the script, Validate the result, and Troubleshooting.
  • Updated the syntax and examples so they match the corrected script.
  • Removed legacy error text tied to the previous script implementation.
  • Improved wording and consistency throughout the article.

Important

This issue is urgent because the currently published script is not only outdated, but unsafe in practice.

In testing, the published version failed as written. More importantly, if a user attempts to work around the startup failure by simply removing the invalid Microsoft.EnterpriseManagement.OperationsManager.ClientShell.Startup.ps1 reference, the script can still leave the SCOM environment in an inconsistent state.

In my case, this caused issues in the SCOM databases, and the Internal Connectors pane in the console remained permanently stuck on Loading, never completing. Recovery was only possible by restoring database backups.

Because of this, the current article requires prompt correction, not only editorial cleanup.

…dance

This change updates the Microsoft Learn article and sample script for removing old Operations Manager connectors.

The current published version contains multiple issues:

- It references "Microsoft.EnterpriseManagement.OperationsManager.ClientShell.Startup.ps1", which causes an error at script startup in PowerShell.
- It uses outdated connector handling that does not execute correctly in the published form.
- The usage guidance is based on the old script structure and does not reflect the actual parameters and behavior required for safe execution.
- The article provides only minimal operational guidance for a destructive maintenance action.

The updated version corrects both the script and the surrounding article content.

Script changes:
- Removed the invalid startup script reference.
- Reworked connector handling to use a working OperationsManager PowerShell / SDK-based approach.
- Corrected the matching logic so the script handles both single-object and multi-object results safely.
- Added support for safer execution by using named parameters and ShouldProcess semantics, including -WhatIf and -Confirm.
- Preserved the intended cleanup behavior for subscriptions, alert connector associations, uninitialization, and connector removal.

Article/content changes:
- Reworked the article structure to explain when the procedure should be used and what the script does.
- Added a dedicated prerequisite section with backup and safety guidance.
- Replaced the outdated "More information" section with clear "Run the script", "Validate the result", and "Troubleshooting" sections.
- Updated the usage examples so they match the corrected script.
- Removed legacy error text that was tied to the previous script implementation and no longer reflected the revised procedure.
- Improved the article wording so it better aligns with current OperationsManager PowerShell terminology.

Important:
This issue is urgent because the currently published script is not only outdated, but operationally dangerous in practice. In testing, the published version fails as written. More importantly, if a user attempts to work around the startup failure by simply removing the invalid "Microsoft.EnterpriseManagement.OperationsManager.ClientShell.Startup.ps1" reference, the script can still leave the SCOM environment in an inconsistent state. In my case, this caused issues in the SCOM databases and the Internal Connectors pane in the console remained permanently stuck on "Loading", never completing. Recovery required restoring database backups.

Because of this, the current article should be treated as requiring prompt correction, not just editorial cleanup.
@prmerger-automator
Copy link

@StoyanChalakov : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@StoyanChalakov
Copy link
Author

#sign-off

@prmerger-automator
Copy link

Invalid command: '#sign-off'. Only the assigned author of one or more file in this PR can sign off. @JarrettRenshaw

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit c81c055:

✅ Validation status: passed

File Status Preview URL Details
support/system-center/scom/remove-old-product-connectors.md ✅Succeeded

For more details, please refer to the build report.

@prmerger-automator
Copy link

PRMerger Results

Issue Description
File Change Percent This PR contains file(s) with more than 30% file change.

@rmca14
Copy link
Contributor

rmca14 commented Mar 17, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants