When it is launched in backup mode, it backs up the current DRS Automation Level settings in a
JSON file and update the DRS Automation value to 'Manual'. The utility skips update task on the cluster where DRS Automation Level value is already set to manual or vSphere DRS is disabled.
When it is launched in restore mode, it restores the DRS Automation Level values for each cluster from the
JSON file. Once the restore task is completed, it automatically verifies the DRS Automation Level setting of the clusters with the selected
JSON file to verify that the settings are applied successfully. Note: The utility skips restore task on the cluster where DRS Automation Level value were set to manual before backup or vSphere DRS is disabled.
When it is launched in verify mode, it verifies the DRS Automation Level values for each cluster with the
JSON file.
The utility skips verify task on the cluster where vSphere DRS is disabled.
Prerequisites:
- Windows 10, Windows Server 2016 or Windows Server 2019.
- VMware PowerCLI
Execution policy should be set to "RemoteSigned": 1. Set Windows PowerShell execution policy:
PS C:\> Set-ExecutionPolicy -Scope CurrentUser RemoteSigned 2. Close the current Windows PowerShell window, re-start Windows PowerShell
If selfsignd/not Trusted certificates are used on the VC, please execute the following command :
PS C:\> Set-PowerCLIConfiguration -Scope Session -InvalidCertificateAction PromptUsage:Use the utility to back up the current DRS Automation Level value and update DRS Automation value to 'Manual'
1. Open a Windows PowerShell prompt and navigate to the directory where you extracted the attached .zip.
2. Run the PowerShell script to launch the menu.
.\Backup_Restore_vSphere_DRS_Automation_Level.ps1 3. Enter the FQDN or IP address of vCenter Server and press Enter.
4. When prompted, enter the vCenter Server credentials and select OK.
5. Select Option 1 to back up the current DRS Automation Level settings in a
JSON file and
update the DRS Automation value to 'Manual'.
Note: The settings are saved in a
JSON file and stored in the same directory.
JSON filename contains IP/FQDN of the VC and timestamp.
Use the utility to restore the DRS Automation Level values for each cluster from the
JSON file:
1. Run the PowerShell script to launch the menu.
.\Backup_Restore_vSphere_DRS_Automation_Level.ps1 2. Enter the FQDN or IP address of vCenter Server and press Enter.
3. When prompted, enter the vCenter Server credentials and select OK.
4. Select Option 2 and when prompted, select the path to the relevant
JSON file (stored by option 1)
containing the DRS Automation Level settings of clusters.
5. Press ‘Y’ to confirm the restore task.
6. Once the restore task is completed, it automatically verifies the DRS Automation Level setting of the
clusters with the selected
JSON file to verify the settings are applied successfully.
Use the utility to verify the DRS Automation Level values for each cluster from the
JSON file:
1. Run the PowerShell script to launch the menu.
.\Backup_Restore_vSphere_DRS_Automation_Level.ps1 2. Enter the FQDN or IP address of vCenter Server and press Enter.
3. When prompted, enter the vCenter Server credentials and select OK.
4. Select Option 3 and when prompted, select the path to the relevant
JSON file (stored by option 1)
containing the DRS Automation Level settings of clusters.
5. Press ‘Y’ to confirm the verify task.
6. It verifies the DRS Automation Level value of the clusters with the selected
JSON file to check
the configuration drift.
As an alternative to the interactive approach, the utility could be used in command line mode with the following arguments:
- Command to back up the current DRS Automation Level value and then update DRS Automation value to 'Manual'
.\Backup_Restore_vSphere_DRS_Automation_Level.ps1 -vCenterServer 'sfo-m01-vc01.sfo.rainpole.io'
-username '[email protected]' -password ‘*********’ -task "Backup"
- Command to restore the DRS Automation Level values for each cluster from the JSON file
.\Backup_Restore_vSphere_DRS_Automation_Level.ps1 -vCenterServer 'sfo-m01-vc01.sfo.rainpole.io' -username '[email protected]' -password ‘*********’ -task "Restore" jsonFile ‘sfo-m01-vc01.sfo.rainpole.io_02-10-2022_19-55-06.json’
- Command to verify the DRS Automation Level values for each cluster with the JSON file
.\Backup_Restore_vSphere_DRS_Automation_Level.ps1 -vCenterServer 'sfo-m01-vc01.sfo.rainpole.io' -username '[email protected]' -password ‘*********’ -task "Verify" -jsonFile ‘sfo-m01-vc01.sfo.rainpole.io_02-10-2022_19-55-06.json’