If you only had a single storage group, the script in Exchange 2007 and Windows 2008: Online Exchange Backup (part 6 of 7) would not find any storage groups. The primary reason for that I always have a RSG too! 🙂 The fix is easy. In getStoragegroups, change the beginning few lines:
function getStorageGroups { $count = 0 # # locate the storage groups and their log files and system files # $colSG = get-StorageGroup -server $computername if ($colSG.Count -lt 1) else { write-host "No storage groups found on server $computername" return 1 }
to look like this:
function getStorageGroups { $count = 0 # # locate the storage groups and their log files and system files # $colSG = get-StorageGroup -server $computername ### if ($colSG.Count -lt 1) if (($colSG -is [Microsoft.Exchange.Data.Directory.SystemConfiguration.StorageGroup]) -or ($colSG -is [System.Object[]])) { ## everything is good } else { write-host "No storage groups found on server $computername" return 1 }
Until next time…
As always, if there are items you would like me to talk about, please drop me a line and let me know!
Follow me on twitter: @EssentialExch