Ok so here is the skinny.
Works on both 10 and 11 with out issue. If you have Windows 7 Backups turned on in available settings.
The plugin works off of the wb-admin.exe tool provided by Windows backups. If you are using the Azure backups then there is a different client for that and not apart of this plugin.
If you can execute wbadmin.exe GET Versions with out error then our plugin will read the agent and update scan statuses in plugin.
Here is an excerpt from our scanning powershell script that captures that data. Try opening a admin ISE powershell console and pasting the code in. Execute it and see if you do not get a return from it.
Code: Select all
if (-not (Test-Path -Path 'C:\Windows\System32\wbadmin.exe')){continue}
$content = WBAdmin.exe GET VERSIONS
if (-not $content){continue}
$newJobLines = @($content | Select-String -Pattern 'Backup time: ')
$i = 0
$newJobLines | ForEach-Object{
$lineNumberLocation = $_.LineNumber
$backupLocation = $content[$lineNumberLocation] -replace 'Backup location: '
$lineNumberVersionIdentifier = $_.LineNumber + 1
$backupVersionIdentifier = $content[$lineNumberVersionIdentifier] -replace 'Version identifier: '
$wbAdminDateStringFormat = 'MM\/dd\/yyyy-HH:mm'
$backupDateTimeFromVersionIdentifier = [DateTime]::ParseExact($backupVersionIdentifier, $wbAdminDateStringFormat, $null)
$backupDateTimeUtcSpecified = [DateTime]::SpecifyKind($backupDateTimeFromVersionIdentifier, [System.DateTimeKind]::Utc)
$backupDateTimeLocalTime = $backupDateTimeUtcSpecified.ToLocalTime()
$backupDateTimeLocalTime = $backupDateTimeLocalTime.ToString("yyyy-MM-dd HH:mm:ss")
$lineNumberCanRecover = $_.LineNumber + 2
$backupVersionCanRecover = $content[$lineNumberCanRecover] -replace 'Can recover: '
$lineNumberCanRecover = $_.LineNumber + 3
$backupSnapshotID = $content[$lineNumberCanRecover] -replace 'Snapshot ID: '
$myItems = WBADMIN GET ITEMS -version:$backupVersionIdentifier
if (-not $myItems){continue}
$newItemLines = @($myItems | Select-String -Pattern 'Volume ID = ')
$newItemLines | ForEach-Object{
$line1NumberLocation = $_.LineNumber
$Volumes = $myItems[$line1NumberLocation] -replace 'Volume '
$Volumes = $Volumes -replace "'",""
$Volumes = $Volumes -replace ","," -"
$line1NumberVolumeSizeIdentifier = $_.LineNumber + 1
$VolumeSize = $myItems[$line1NumberVolumeSizeIdentifier] -replace 'Volume size = '
$line1NumberCanRecoverIdentifier = $_.LineNumber + 2
$CanRecover = $myItems[$line1NumberCanRecoverIdentifier] -replace 'Can recover = '
}
if($i -eq 0){
write-Output "($ComputerID, $ClientID,'$backupDateTimeLocalTime','$backupLocation ','$backupVersionIdentifier','$backupVersionCanRecover','$backupSnapshotID','$Volumes','$VolumeSize','$CanRecover')"
}else{
write-Output ",($ComputerID, $ClientID,'$backupDateTimeLocalTime','$backupLocation ','$backupVersionIdentifier','$backupVersionCanRecover','$backupSnapshotID','$Volumes','$VolumeSize','$CanRecover')"
}
$i ++
}
You should get an output like this if volumes exist.
b-99f9-4b82-8e20-b521c8ce4c8e}',' - mounted at <not mounted> ( - mounted at <not mounted> at the time ','the backup was created)','Volume size = 750.00 MB')
,(, ,'2023-01-14 20:00:00','Backup target: 1394/USB Disk labeled Seagate Backup Plus Drive(D:) ','01/15/2023-01:00','Volume(s), File(s), Application(s), Bare Metal Recovery, System State','{608bab8
0-7842-4864-beb2-aff63aa8a257}',' - mounted at <not mounted> ( - mounted at <not mounted> at the time ','the backup was created)','Volume size = 750.00 MB')
,(, ,'2023-01-15 20:00:00','Backup target: 1394/USB Disk labeled Seagate Backup Plus Drive(D:) ','01/16/2023-01:00','Volume(s), File(s), Application(s), Bare Metal Recovery, System State','{5a34388
b-77f1-4ac7-87eb-85bab611e6f2}',' - mounted at <not mounted> ( - mounted at <not mounted> at the time ','the backup was created)','Volume size = 750.00 MB')
,(, ,'2023-01-16 20:00:00','Backup target: 1394/USB Disk labeled Seagate Backup Plus Drive(D:) ','01/17/2023-01:00','Volume(s), File(s), Application(s), Bare Metal Recovery, System State','{d55ead5
0-9822-4942-8f41-013df9f9693f}',' - mounted at <not mounted> ( - mounted at <not mounted> at the time ','the backup was created)','Volume size = 750.00 MB')
,(, ,'2023-01-17 20:00:00','Backup target: 1394/USB Disk labeled Seagate Backup Plus Drive(D:) ','01/18/2023-01:00','Volume(s), File(s), Application(s), Bare Metal Recovery, System State','{1aea3dc
6-35f3-4e8f-8dfa-6c7e331fa141}',' - mounted at <not mounted> ( - mounted at <not mounted> at the time ','the backup was created)','Volume size = 750.00 MB')
PS C:\WINDOWS\system32>
The Windows 7 backup tool is under all control panel items as seen in image below..
- Screenshot 2023-01-18 134352.png (83.77 KiB) Viewed 15288 times