Forums Dev-stuff Tips and trix, for installation and configuration, DevOps.. Comments Export settings for an IIS-site and/or its pool Steps to export: 1.Open a command prompt (cmd.exe) as an administrator.2.Navigate to the folder of "appcmd.exe", usually by running "cd C:\Windows\System32\inetsrv".3.Export all site-info by running the command "appcmd.exe list SITE/config /xml > C:\SiteSettings.xml"4.Export all pool-info by running the command "appcmd.exe list APPPOOL /config /xml > C:\PoolSettings.xml"5.Export IIS-server settings by command "appcmd.exe list CONFIG /config /xml > C:\IISSettings.xml"To do import of a XML-file, run "appcmd.exe add site /in < C:\SiteSettings.xml" Log in to post comments Restore dates of files in a GIT repository PowerShell-script utilizing GIT to restore dates of files: Get-ChildItem -Recurse | ForEach-Object { $commitTime = git log -1 --format='%ai' -- $_.FullName if ($commitTime) { $_.LastWriteTime = $commitTime } } Log in to post comments Log in to post comments
Export settings for an IIS-site and/or its pool Steps to export: 1.Open a command prompt (cmd.exe) as an administrator.2.Navigate to the folder of "appcmd.exe", usually by running "cd C:\Windows\System32\inetsrv".3.Export all site-info by running the command "appcmd.exe list SITE/config /xml > C:\SiteSettings.xml"4.Export all pool-info by running the command "appcmd.exe list APPPOOL /config /xml > C:\PoolSettings.xml"5.Export IIS-server settings by command "appcmd.exe list CONFIG /config /xml > C:\IISSettings.xml"To do import of a XML-file, run "appcmd.exe add site /in < C:\SiteSettings.xml" Log in to post comments
Restore dates of files in a GIT repository PowerShell-script utilizing GIT to restore dates of files: Get-ChildItem -Recurse | ForEach-Object { $commitTime = git log -1 --format='%ai' -- $_.FullName if ($commitTime) { $_.LastWriteTime = $commitTime } } Log in to post comments
Comments
Export settings for an IIS-site and/or its pool
Steps to export:
To do import of a XML-file, run "appcmd.exe add site /in < C:\SiteSettings.xml"
Restore dates of files in a GIT repository
PowerShell-script utilizing GIT to restore dates of files: