MyITGuy
3/1/2018 - 3:23 PM

PowerShell: Export Get-QARSOperation

This is an example of how to export objects from Get-QARSOperation.

$QARSOperations = Get-QARSOperation -CompletedRecently ([timespan]::FromDays(1)) -Proxy
$QARSOperations | Select @{Name="AttributeChanges";Expression={$_.AttributeChanges.Name -join ','}},@{Name="Controls";Expression={$_.Controls.ID -join ','}},ID,OperationGuid,Type,Status,Initiated,Completed,@{Name="InitiatedBy";Expression={$_.InitiatorInfo.NTAccountName}},@{Name="Target";Expression={$_.TargetObjectInfo.DN}} | Export-Csv -NoTypeInformation -Path .\QARSOperation_Last_Day.csv