Quick PowerShell hack to view IncludeObjectsInDataSync
Monday
Posts: 77 Silver 3
We have a need to view which tables are set to include data and the current UI is awful for finding this in visual studio. I opened a user voice for this but until this is implemented, here is a quick powershell script to display in a gidview which can be filtered, sorted, etc,
$Path = 'C:\DEV\EAM_DB_SQLChangeAutomation\EAM_DB_SQLChangeAutomation\EAM_DB_SQLChangeAutomation.sqlproj'
$xml = [xml](get-content $Path)
$attr = $xml.GetElementsByTagName('IncludeObjectsInDataSync') |Select-Object
$test = $attr.'#text'.replace("Table=","").replace(";","").Split([Environment]::NewLine::RemoveEmptyEntries) | Sort-Object
$test.Where({ $_ -ne "" }) | Out-GridView -Title "IncludeObjectsInDataSync"