Replace unsafe SCOM connector cleanup script and update article guidance#2046
Open
StoyanChalakov wants to merge 1 commit intoMicrosoftDocs:mainfrom
Open
Replace unsafe SCOM connector cleanup script and update article guidance#2046StoyanChalakov wants to merge 1 commit intoMicrosoftDocs:mainfrom
StoyanChalakov wants to merge 1 commit intoMicrosoftDocs:mainfrom
Conversation
…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.
|
@StoyanChalakov : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
Author
|
#sign-off |
|
Invalid command: '#sign-off'. Only the assigned author of one or more file in this PR can sign off. @JarrettRenshaw |
Contributor
|
Learn Build status updates of commit c81c055: ✅ Validation status: passed
For more details, please refer to the build report. |
PRMerger Results
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes and modernizes the Microsoft Learn article for removing old Operations Manager connectors.
The currently published version has multiple problems:
Microsoft.EnterpriseManagement.OperationsManager.ClientShell.Startup.ps1, which causes an error at script startup in PowerShell.This PR updates both the script and the article content.
Script changes
ShouldProcess, including-WhatIfand-Confirm.Article changes
More informationsection withRun the script,Validate the result, andTroubleshooting.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.ps1reference, 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.