I have written the following script (adding extract):
$count = 0 Write-host $sqlData.Count ForEach ($Table in $sqlData.Tables) {