As a result of a dramatic failure of communication the SCSM workflow AD account was deleted and recreated, after some muching about everything in SCSM is now working normally again except the config manager and AD connectors are not updating their status.
I initially thought they were not running at all but I have confirmed that they are in fact synchronizing data from their respective sources and its just the display of the status that is not updating. I tried deleting them and recreating them and now they display no status i.e. the start time, finish time, status, and Percentage columns are all blank.
I have done a bit of research and believe that the problem is that the relationships between the Connectors and their respective SyncStatus objects is missing/broken, and for some reason creating new Connectors either does not establish a corresponding SyncStatus object or does but does not relate it to the connector.
I have a couple of reasons for this hypothesis first is when I run this powershell*:
$connectorDispName="Your Connector Name Here" #Following will return in instance of Microsoft.EnterpriseManagement.ServiceManager.Sdk.Connectors.ADConnector $myConnector=Get-SCSMConnector -DisplayName $connectorDispName #Get the EMO object for relationship lookup $emoConnObj=$myConnector.ConnectorObject #Relationship id can be retrieved with following: #Get-SCRelationship -Name 'Microsoft.SystemCenter.LinkingFramework.DataSourceHostSyncStatus'|select id $relationshipId='1548950d-6cea-d9c1-11ec-53701fbcbbec' #Find the matching relationship object (with the above relationshipId) $relationshipObject=Get-SCRelationshipInstance -sourceInstance $emoConnObj|?{$_.RelationshipId -eq $relationshipId} #$relationshipObject.TargetObject contains an EMO. #Grab the id and use Get-SCClassInstance to return a type of Microsoft.SystemCenter.LinkingFramework.SyncStatus $syncStatusObj=Get-SCClassInstance -Id $relationshipObject.TargetObject.Id
The following error is returned:
Get-SCClassInstance : Cannot validate argument on Parameter 'Id'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At D:\tools\scripts\ConnectorSyncStatus.ps1:14 char:40 + $syncStatusObj=Get-SCClassInstance -Id $relationshipObject.TargetObject.Id + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Get-SCClassInstance], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.SystemCenter.Core.Commands.GetSCClassInstanceCommand
Possibly the Powershell is incorrect but this result implies to me that the Get-SCRelationshipInstance call is returning a null value for the syncstatus object which is being fed into the Get-SCClassinstance call.
My second reason for this hypothesis is the following SQL results:
select RelationshipTypeId from dbo.RelationshipType where dbo.relationshiptype.RelationshipTypeName = 'Microsoft.SystemCenter.LinkingFramework.DataSourceHostSyncStatus';
1548950D-6CEA-D9C1-11EC-53701FBCBBEC
select * from dbo.relationship where RelationshipTypeId = '1548950D-6CEA-D9C1-11EC-53701FBCBBEC';
Returns no results.
This implies to me that there are no instances of the relationship linking a Connector to its corresponding SyncStatus object.
I am not an SQL or Powershell expert but I know enough to be dangerous, so does my reasoning seem correct? And if so how could I fix this?
Thanks In advance
* this Powershell is not of my own devising, I cribbed it from Steve IAnson in this question: Query Connector Status