|
@@ -90,7 +90,8 @@ function check_disk($diskoverride=$false) {
|
|
|
if ($last_updated.AddDays(20) -lt (Get-Date)) {
|
|
|
if (!($diskoverride)) {
|
|
|
Write-Host -ForegroundColor DarkRed "This disk was last used less than 3 weeks ago. Override with -diskoverride."
|
|
|
- throw 'Unable to proceed'
|
|
|
+ #throw 'Unable to proceed'
|
|
|
+ Exit 1
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -98,7 +99,8 @@ function check_disk($diskoverride=$false) {
|
|
|
# How much free space is there?
|
|
|
if ($backupDisk.FreeSpace / 1gb -lt 20) {
|
|
|
Write-Host -ForegroundColor DarkRed "There is less than 20gb free on the disk."
|
|
|
- throw 'Unable to proceed'
|
|
|
+ #throw 'Unable to proceed'
|
|
|
+ Exit 1
|
|
|
}
|
|
|
|
|
|
|