Posts Tagged ‘ISA’

Backup TMG configuration using Powershell

In Powershell on September 23, 2011 at 13:08

Unfortunatly TMG doesn’t ship with any specific Powershell cmdlets. However, using COM objects you can export/backup up the TMG (or ISA) configuration to a xml file.

Depending on your environment there are two options, if you have an Enterprise Array use this:

$root= New-Object -ComObject “FPC.Root”


If you have an standalone array use this instead:

$root= New-Object -ComObject “FPC.Root



To give an example, this what a typical script to backup TMG will look like:
if ($err)
    write-eventlog -logname Application -source TMGBackup -eventid 9999 -entrytype Warning -message “Backup
failed, cause: $err” -category 0
write-eventlog -logname Application -source TMGBackup -eventid 9000 -entrytype Information -message “Backup Succeeded” -category 0

You should of course first register the eventlog source using new-eventlog to register the TMGBackup eventlog source.