Creating SnapCenter for Exchange Resource Groups using PowerShell


 

Carrying on from the previous post.

In the previous post, I needed to create 10 resource groups. The first two I’d created using the SnapCenter WebUI as an example. For the other 8 resource groups, I’ll use the SnapCenter PowerShell cmdlets. For completeness, I list the commands for all 10 resource groups here, the first one is broken down so it is easier to read.

Add-SmResourceGroup
-ResourceGroupName 'DB1 MB1 MB2'
-PluginCode SCE
-Policies '3 days hourly FL','7 days daily FL'
-Resources @{"Host"="MB1.demo.com";"Type"="Exchange Database";"Names"="MB1.demo.com\DB1"}
-BackupServers 'MB1','MB2'
-SchedulerRunAsName 'SCAdmin'
-Schedules @{"PolicyName"="3 days hourly FL";"ScheduleType"="Hourly";"StartTime"="10/26/2019 2:00 PM"},@{"PolicyName"="7 days daily FL";"ScheduleType"="Daily";"StartTime"="10/26/2019 2:00 PM"}
-SchedulerType Windows

The 5 Resource Groups with MB1 and MB2 as Backup Servers:

Add-SmResourceGroup -ResourceGroupName 'DB1 MB1 MB2' -PluginCode SCE -Policies '3 days hourly FL','7 days daily FL' -Resources @{"Host"="MB1.demo.com";"Type"="Exchange Database";"Names"="MB1.demo.com\DB1"} -BackupServers 'MB1','MB2' -SchedulerRunAsName 'SCAdmin' -Schedules @{"PolicyName"="3 days hourly FL";"ScheduleType"="Hourly";"StartTime"="10/26/2019 2:00 PM"},@{"PolicyName"="7 days daily FL";"ScheduleType"="Daily";"StartTime"="10/26/2019 2:00 PM"} -SchedulerType Windows

Add-SmResourceGroup -ResourceGroupName 'DB2 MB1 MB2' -PluginCode SCE -Policies '3 days hourly FL','7 days daily FL' -Resources @{"Host"="MB2.demo.com";"Type"="Exchange Database";"Names"="MB2.demo.com\DB2"} -BackupServers 'MB1','MB2' -SchedulerRunAsName 'SCAdmin' -Schedules @{"PolicyName"="3 days hourly FL";"ScheduleType"="Hourly";"StartTime"="10/26/2019 2:00 PM"},@{"PolicyName"="7 days daily FL";"ScheduleType"="Daily";"StartTime"="10/26/2019 2:00 PM"} -SchedulerType Windows

Add-SmResourceGroup -ResourceGroupName 'DB3 MB1 MB2' -PluginCode SCE -Policies '3 days hourly FL','7 days daily FL' -Resources @{"Host"="MB1.demo.com";"Type"="Exchange Database";"Names"="MB1.demo.com\DB3"} -BackupServers 'MB1','MB2' -SchedulerRunAsName 'SCAdmin' -Schedules @{"PolicyName"="3 days hourly FL";"ScheduleType"="Hourly";"StartTime"="10/26/2019 2:00 PM"},@{"PolicyName"="7 days daily FL";"ScheduleType"="Daily";"StartTime"="10/26/2019 2:00 PM"} -SchedulerType Windows

Add-SmResourceGroup -ResourceGroupName 'DB4 MB1 MB2' -PluginCode SCE -Policies '3 days hourly FL','7 days daily FL' -Resources @{"Host"="MB2.demo.com";"Type"="Exchange Database";"Names"="MB2.demo.com\DB4"} -BackupServers 'MB1','MB2' -SchedulerRunAsName 'SCAdmin' -Schedules @{"PolicyName"="3 days hourly FL";"ScheduleType"="Hourly";"StartTime"="10/26/2019 2:00 PM"},@{"PolicyName"="7 days daily FL";"ScheduleType"="Daily";"StartTime"="10/26/2019 2:00 PM"} -SchedulerType Windows

Add-SmResourceGroup -ResourceGroupName 'DB5 MB1 MB2' -PluginCode SCE -Policies '3 days hourly FL','7 days daily FL' -Resources @{"Host"="MB1.demo.com";"Type"="Exchange Database";"Names"="MB1.demo.com\DB5"} -BackupServers 'MB1','MB2' -SchedulerRunAsName 'SCAdmin' -Schedules @{"PolicyName"="3 days hourly FL";"ScheduleType"="Hourly";"StartTime"="10/26/2019 2:00 PM"},@{"PolicyName"="7 days daily FL";"ScheduleType"="Daily";"StartTime"="10/26/2019 2:00 PM"} -SchedulerType Windows

The 5 Resource Groups with MB3 as Backup Servers:

Add-SmResourceGroup -ResourceGroupName 'DB1 MB3' -PluginCode SCE -Policies '3 days hourly FL','30 days daily FL' -Resources @{"Host"="MB1.demo.com";"Type"="Exchange Database";"Names"="MB1.demo.com\DB1"} -BackupServers 'MB3' -SchedulerRunAsName 'SCAdmin' -Schedules @{"PolicyName"="3 days hourly FL";"ScheduleType"="Hourly";"StartTime"="10/26/2019 2:00 PM"},@{"PolicyName"="30 days daily FL";"ScheduleType"="Daily";"StartTime"="10/26/2019 2:00 PM"} -SchedulerType Windows

Add-SmResourceGroup -ResourceGroupName 'DB2 MB3' -PluginCode SCE -Policies '3 days hourly FL','30 days daily FL' -Resources @{"Host"="MB2.demo.com";"Type"="Exchange Database";"Names"="MB2.demo.com\DB2"} -BackupServers 'MB3' -SchedulerRunAsName 'SCAdmin' -Schedules @{"PolicyName"="3 days hourly FL";"ScheduleType"="Hourly";"StartTime"="10/26/2019 2:00 PM"},@{"PolicyName"="30 days daily FL";"ScheduleType"="Daily";"StartTime"="10/26/2019 2:00 PM"} -SchedulerType Windows

Add-SmResourceGroup -ResourceGroupName 'DB3 MB3' -PluginCode SCE -Policies '3 days hourly FL','30 days daily FL' -Resources @{"Host"="MB1.demo.com";"Type"="Exchange Database";"Names"="MB1.demo.com\DB3"} -BackupServers 'MB3' -SchedulerRunAsName 'SCAdmin' -Schedules @{"PolicyName"="3 days hourly FL";"ScheduleType"="Hourly";"StartTime"="10/26/2019 2:00 PM"},@{"PolicyName"="30 days daily FL";"ScheduleType"="Daily";"StartTime"="10/26/2019 2:00 PM"} -SchedulerType Windows

Add-SmResourceGroup -ResourceGroupName 'DB4 MB3' -PluginCode SCE -Policies '3 days hourly FL','30 days daily FL' -Resources @{"Host"="MB2.demo.com";"Type"="Exchange Database";"Names"="MB2.demo.com\DB4"} -BackupServers 'MB3' -SchedulerRunAsName 'SCAdmin' -Schedules @{"PolicyName"="3 days hourly FL";"ScheduleType"="Hourly";"StartTime"="10/26/2019 2:00 PM"},@{"PolicyName"="30 days daily FL";"ScheduleType"="Daily";"StartTime"="10/26/2019 2:00 PM"} -SchedulerType Windows

Add-SmResourceGroup -ResourceGroupName 'DB5 MB3' -PluginCode SCE -Policies '3 days hourly FL','30 days daily FL' -Resources @{"Host"="MB1.demo.com";"Type"="Exchange Database";"Names"="MB1.demo.com\DB5"} -BackupServers 'MB3' -SchedulerRunAsName 'SCAdmin' -Schedules @{"PolicyName"="3 days hourly FL";"ScheduleType"="Hourly";"StartTime"="10/26/2019 2:00 PM"},@{"PolicyName"="30 days daily FL";"ScheduleType"="Daily";"StartTime"="10/26/2019 2:00 PM"} -SchedulerType Windows

Comments