Home Forums Programming Powershell how in powershell (smo and scripter or other object )list tables with dependencies,indexes,FK,constrains RE: how in powershell (smo and scripter or other object )list tables with dependencies,indexes,FK,constrains

  • Ah, right!

    See these Options in the Smo.Transfer class.

    $xfr.Options.DriAll = $true

    $xfr.Options.DriForeignKeys = $true

    $xfr.Options.DriUniqueKeys = $true

    $xfr.Options.DriChecks = $true

    $xfr.Options.DriUniqueKeys = $true

    $xfr.Options.ClusteredIndexes = $true

    $xfr.Options.NonClusteredIndexes = $true

    then, call the script method on the transfer object:

    $xfr.Script()