Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ function Test-VSSSupport {
Param($test_path)

$drive_letter = Split-Path $test_path -Qualifier
$volume = Get-WmiObject -Query "SELECT * FROM Win32_Volume WHERE DriveLetter = '$drive_letter'"
$volume = Get-CimInstance -Query "SELECT * FROM Win32_Volume WHERE DriveLetter = '$drive_letter'"
$deviceID = ($volume.DeviceID -replace '.*(\{.*\}).*', '$1')
### https://learn.microsoft.com/en-us/previous-versions/windows/desktop/vsswmi/win32-shadowvolumesupport
$supportedVolumes = Get-WmiObject -Query "SELECT * FROM Win32_ShadowVolumeSupport WHERE __PATH LIKE '%$deviceID%'"
$supportedVolumes = Get-CimInstance -Query "SELECT * FROM Win32_ShadowVolumeSupport WHERE __PATH LIKE '%$deviceID%'"

return ($null -ne $supportedVolumes)
}
Expand Down Expand Up @@ -434,7 +434,7 @@ function Invoke-ConnectivityCheck {
}

# skip the internet connectivity check for local repos
if(Test-Path $env:RESTIC_REPOSITORY) {
if(Test-Path "$env:RESTIC_REPOSITORY") {
"[[Internet]] Local repository. Skipping internet connectivity check." | Out-File -Append $SuccessLog
return $true
}
Expand Down