Created
March 15, 2018 22:23
-
-
Save shaneis/069d330a19d737fd21190bec071a49c4 to your computer and use it in GitHub Desktop.
Script to show how to get a row count for tables in a SQL Server database.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$DatabaseParam = @{ | |
SqlInstance = 'localhost\SQLDEV2K14' | |
Database = 'DMODisabled' | |
} | |
Get-DbaDatabase @DatabaseParam | | |
Select-Object -ExpandProperty Tables | | |
ForEach-Object -Process { | |
[PSCustomObject]@{ | |
Name = $_.Name | |
RowCount = $_.RowCount | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment