Created
May 10, 2019 10:06
-
-
Save SQLDBAWithABeard/4af918a33686d98d9cfcaa65d3f694f3 to your computer and use it in GitHub Desktop.
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
$instance = '' | |
$Databases = '' | |
$CompressedSize = @{Name='Compressed';Exp={[math]::round($_.CompressedBackupSize/1Tb,3)}} | |
$Size = @{Name = 'Size';Exp={[math]::Round($_.TotalSize/1Tb,3)}} | |
## Get the info | |
Get-DbaBackupHistory -SqlInstance $instance -Database $databases -Last -Raw | Select Database, Path, $CompressedSize , $Size | |
#get the total size of files | |
(Get-DbaBackupHistory -SqlInstance $instance -Database $databases -Last -Raw | Select Database, Path, $CompressedSize | Measure-Object Compressed -Sum).Sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment