If you import the Exchange connector MP and then create an Exchange connector and then delete the Exchange connector MP without first deleting the Exchange connector from the Connectors view you will end up with an orphaned Exchange connector object in the Connectors view. To avoid this happening just delete the Exchange connector from the Connectors view prior to deleting the Exchange connector MP. Chances are if you are reading this blog post though you did it in the wrong order.
Note: If you are new to PowerShell you might want to get a friend to help you with this.
Here is how to get rid of an orphaned Exchange connector.
Get-SCSMObject –Class (Get-SCSMClass –Name Microsoft.SystemCenter.Connector)
You should get back some results that look like this:
Normally you can just run a command like this to remove your connector:
Get-SCSMObject –Class (Get-SCSMClass –Name Microsoft.SystemCenter.Connector) | ?{$_.DisplayName –eq “Exchange Connector”} | Remove-SCSMObject –Force –Confirm
Obviously, in your case you would need to use the actual display name for your connector. In this case it is “Exchange Connector”.
In this case there are actually two connectors with the same name. In order to get just the one we want we can also use the LastModified timestamp to delete the one we want like this:
Get-SCSMObject –Class (Get-SCSMClass –Name Microsoft.SystemCenter.Connector) | ?{$_.DisplayName –eq “Exchange Connector”} | ?{$_.LastModified –lt “8/30/2011 9:00:00 AM”} | Remove-SCSMObject –Force -Confirm
Hope that helps!
Update Oct 19, 2012 - Apparently if you use this approach with Linking Framework based connectors it will cause some issues. So - please don't use this approach with any AD or SCCM connectors.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.