This PowerShell script lists all tables in a SQL server database and exports the list as CSV. Install-Module InvokeQuery Run the above command if you do not have this module.