2848 shaares
5 private links
5 private links
@{ Name = 'FromComputer'; Expression = { hostname }}
Scriptblock
I will be the first to admit: the script is a lot to digest. However, before trying to completely reverse engineer all of the logic on first glance, I urge you to try this code (with the EXEC lines still commented out of course) in your hairiest, most complex schemas. Please let me know if you have a scenario where you find any discrepancies in the comments section below.
const BindingFlags flags = BindingFlags.Public | BindingFlags.Instance;Convert DataTable to List using a Generic Method