$computername='sql01' function getSqlBackupInfo ($sqlInstanceName=$env:computername, $dbName){ [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") $location=if($sqlInstanceName.Contains("`\")){ "SQLSERVER:\SQL\$sqlInstanceName\Databases" }else{ "SQLSERVER:\SQL\$sqlInstanceName\DEFAULT\Databases" } function getPacificTime($time){ if($time){ [System.TimeZoneInfo]::ConvertTimeBySystemTimeZoneId($time,'Pacific…