Last active
December 27, 2017 12:09
-
-
Save scottglew/6241609 to your computer and use it in GitHub Desktop.
This script exports your Forefront TMG Array configuration as a backup.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' TMG Array Configuration Backup Script | |
' | |
' Purpose: The Script exports the Array configuration as a backup | |
' Changes Required: Specify a custom password, comment and backup location. Save as AutoExportArray.vbs. | |
' Usage: Execute the scrip on the TMG server with the following command | |
' cscript AutoExportArray.vbs | |
' | |
' ********** Supplied by @Fastvue / @WebSpy / @FixMyITSystem / @JasonJonesUK / @RichardHicks ********** | |
' | |
' ---------------------------------------------------------------------------------------- | |
' | |
'Export strings | |
password = "mypassword" | |
comment = """Scripted Backup""" | |
'Backup location can be local or network location | |
BackupLocation = "\\networkname\share" | |
'--------------- No changes required beyond this line ------------------------------------ | |
Dim root | |
Dim Array | |
localdate = FormatDateTime(date(), 1) 'Displays according to the system long date format | |
Datestring = " " & localdate | |
Set root = CreateObject("FPC.Root") | |
Set Array = root.GetContainingArray() | |
'Backing Up Array Config | |
Wscript.echo "Saving Configuration to " & BackupLocation & "...." | |
wscript.echo "Exporting - " & Array | |
Array.ExportToFile BackupLocation & Array & Datestring &".xml", 15, password, comment | |
Wscript.echo "Exporting Completed" | |
WScript.Quit | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment