Skip to content
This repository was archived by the owner on Nov 7, 2024. It is now read-only.

Commit e75bbe6

Browse files
- Additional console feedback on Task 1 to display GPO backups
1 parent eab5dc3 commit e75bbe6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Windows-Samples/Tools & Utilities/AirWatch GPO Migration/Migrate-GPO-AirWatch.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,15 @@ function MAIN {
707707
# Handle Task selection
708708
switch ($selection) {
709709
"1" {
710-
Get-GPOBackups | Out-GridView -OutputMode Multiple -Title "GPO Backups"
710+
$gpoBackups = @(Get-GPOBackups)
711+
if ($gpoBackups.Count -ge 1) {
712+
Write-Host "`nFound $($gpoBackups.Count) GPO backups within '$backupFolder'!"
713+
$gpoBackups | Out-GridView -OutputMode Multiple -Title "GPO Backups" | Out-Null
714+
}
715+
else {
716+
Write-Warning "No GPO backups or captures exist within '$backupFolder'!"
717+
Write-Warning "Copy existing GPO backups into the above directory or capture a GPO backup using this tool first!"
718+
}
711719
}
712720

713721
"2" {

0 commit comments

Comments
 (0)