Created
November 25, 2017 21:57
-
-
Save Stuart-Moore/54b7e967097b6467047fa6790ab4c95f to your computer and use it in GitHub Desktop.
Parallel Header scans on single server
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
Import-Module poshrsjob | |
$folders = ('C:\dbatools\RestoreTimeClean','C:\dbatools\RestoreTimeDiffDemo','c:\dbatools\restoretimeDiff') | |
$job = $Folders | Start-RsJob -ModulesToImport dbatools -ScriptBlock { | |
param($Folder) | |
Get-DbaBackupInformation -SqlInstance localhost\SqlExpress2016 -Path $Folder | |
} | |
$job | Wait-RsJob -ShowProgress | |
$BackupInformation = $job | Receive-RsJob | |
Get-RsJob | Remove-RSJob | |
$BackupInformation | Restore-DbaDatabase -SqlInstance Server1\Instance -TrustDbBackupHistory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment