Quick Connect Management Shell: it is simple. Part 3

In previous posts Andrei Arefiev gave some useful examples of using QC Management Shell.

Since that time we have received many questions about QC Management Shell. It appears that it is not so simple [:)]

So I decided to write at least one more post about this.


Perhaps one of the most frequent questions is how we can get all objects synced or not synced during specific workflow run.

Let's imagine the following scenario. We have some workflow which syncs HR-system with our AD. Since the sync process is a probable point, where errors could occur, we would like to put all accounts, that were not synced, into some csv file. So later we can check this file and fix problem.

Cool thing about PowerShell is that you can do many things with just one line of code. So I give you one and try to explain how it works:


get-qcsynchistorysummaryrun -WorkflowName * | where {$_.status -eq "PartialSuccess"} | % {(Get-qcsynchistorysummarystep -runID $_.RunID)} | get-qcsynchistoryObjectCategory | get-qcsynchistorydetails|%{$_.SomeProperty1+";"+_.SomeProperty2.SomeLevel2Property+";"} | Out-File C:\QCSyncDetails.csv


With get-qcsynchistorysummaryrun -WorkflowName * we get all workflow run and filter them with where {$_.status -eq "PartialSuccess"}.

Then for each such run we get all steps % {(Get-qcsynchistorysummarystep -runID $_.RunID)} and all objects involved in synchronization with get-qcsynchistoryObjectCategory which can be filtered as Andrey described in previous post: https://www.quest.com/community/

After that we require to choose some properties we want to export %{$_.SomeProperty1+";"+_.SomeProperty2+";"}. Unfortunately these properties are not documented, but you can check them with Get-Member like on screenshot below.

And finally we want some csv which we can create using Out-File C:\QCSyncDetails.csv

Under SrcObject and TrtObject properties you can find more details about syncing objects even their attributes.

Property named Error message can contain end of line symbols, so you might want to remove them, using some regex knowledge like I did on above screenshot.

If you have any questions or suggestion please feel free to ask us on community[:)]