Skip to content

Instantly share code, notes, and snippets.

@shaneis
Last active March 15, 2018 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shaneis/a53453f0ae58ce899cda1a872e48f3b4 to your computer and use it in GitHub Desktop.
Save shaneis/a53453f0ae58ce899cda1a872e48f3b4 to your computer and use it in GitHub Desktop.
We have a match!
$DatabaseParam = @{
SqlInstance = 'localhost\SQLDEV2K14'
Database = 'DMODisabled'
}
Get-DbaDatabase @DatabaseParam |
Select-Object -ExpandProperty Tables |
Where-Object { $_.Name -notmatch "\d{4,6}$" } |
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