/
iis-backup-iis-configuration.json
24 lines (24 loc) · 1.6 KB
/
iis-backup-iis-configuration.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
"Id": "e1006e45-bbde-42e3-b6b9-16d804772684",
"Name": "IIS - Backup IIS Configuration",
"Description": "This backs up the entire IIS configuration for the server (does not include website files). Note that all prior configurations on that IIS server will be cleared out.",
"ActionType": "Octopus.Script",
"Version": 1,
"Properties": {
"Octopus.Action.Script.Syntax": "PowerShell",
"Octopus.Action.Script.ScriptSource": "Inline",
"Octopus.Action.RunOnServer": "false",
"Octopus.Action.Script.ScriptBody": "<#\r\nThis script will take the existing configuration (does not include website files) and back it up on the IIS Server, which can then be later restored if needed.\r\n\r\nTo view existing backups for restore operation, find the latest backup here:\r\n $env:Windir\\System32\\inetsrv\\backup\r\n\r\nTo restore, use the following commands:\r\n Restore-WebConfiguration -Name \"IISConfigBackup\"\r\n iisreset\r\n\r\nReference Articles:\r\nhttps://technet.microsoft.com/en-us/library/hh867851(v=wps.630).aspx\r\nhttps://technet.microsoft.com/en-us/library/hh867862(v=wps.630).aspx\r\n#>\r\n\r\n# clear all backed up configurations first\r\nRemove-WebConfigurationBackup\r\n\r\n# perform backup\r\nBackup-WebConfiguration -Name \"IISConfigBackup\"\r\n",
"Octopus.Action.Script.ScriptFileName": null,
"Octopus.Action.Package.FeedId": null,
"Octopus.Action.Package.PackageId": null
},
"Parameters": [],
"LastModifiedBy": "jjaffery",
"$Meta": {
"ExportedAt": "2016-11-23T21:07:51.416Z",
"OctopusVersion": "3.4.15",
"Type": "ActionTemplate"
},
"Category": "iis"
}