Sample Exchange

 View Only

Backup or Restore SPBM Profiles in vCenter 

Jan 20, 2017 08:09 PM

This script will either export SPBM policies to a folder or import SPBM policies from a folder.

Tested on vCenter 6.5 with PowerCLI 6.5, but should work with earlier versions.

Syntax is:
To Backup SPBM Policies to a Folder
XFER-SPBM-Policies.ps1 -Server -Action export -FilePath

To Restore SPBM Policies from a Folder
XFER-SPBM-Policies.ps1 -Server -Action import -FilePath

Example moving from an old vCenter to a new VCSA:
Connect-VIServer <old vcenter>
XFER-SPBM-Policies.ps1 -Server -Action export -FilePath c:\policies\
Disconnect-VIServer

Connect-VIServer <new VCSA>
XFER-SPBM-Policies.ps1 -Server -Action import -FilePath c:\policies\
Disconnect-VIServer


#VMwarePowerCLI
#vSAN
#Restore
#Backup
#vCenter
#powercli
#Apache2.0
#PowerShell
#VVols

Statistics
0 Favorited
2 Views
1 Files
0 Shares
1 Downloads
Attachment(s)
ps1 file
XFER-SPBM-Policies.ps1   3 KB   1 version
Uploaded - Apr 09, 2024

Tags and Keywords

Comments

Oct 17, 2019 11:45 AM

You may need to update this line to make it works correctly in 6.7 (U3 in my case): Export-SpbmStoragePolicy -FilePath $FilePath\$StoragePolicy.Name.xml -StoragePolicy $StoragePolicy.Name -Server $Server -Force -ErrorAction SilentlyContinue

Mar 14, 2017 03:17 PM

this is very helpful thank you! I hadnt thought of backing these up separate from my vcenter backups, good idea!

Related Entries and Links

No Related Resource entered.