Home Forums Programming Powershell Get table's unique indexes RE: Get table's unique indexes
schleep
SSChampion
Points: 12582
More actions
October 11, 2012 at 5:10 am
#1548009
That does get them, but also returns the PK, which in my case I want to ignore.
I was hoping there was some property or combination of properties in SMO.... And I just found it:
$t.Indexes | ? {$_.IndexKeyType -eq "DriUniqueKey"}
Thanks!
Paul