Jeff Moden (4/17/2013)
I guess I don't understand why don't just read from the system tables/views using TSQL.
I have to write it to a file later, so it is easier with Powershell. I should be able to run an invoke-sqlcmd to use TSQL with powershell.
What table should I read to get the code for those FKs?