Advertisement
opexxx

iischeatsheet.cmd

Oct 24th, 2016
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. REM Delete all Websites
  2. %windir%\system32\inetsrv\appcmd list site /xml | %windir%\system32\inetsrv\appcmd delete site /in
  3.  
  4. REM Delete all App Pools
  5. %windir%\system32\inetsrv\appcmd list apppool /xml | %windir%\system32\inetsrv\appcmd delete apppool /in
  6.  
  7. REM Export all the Application Pools:
  8. %windir%\system32\inetsrv\appcmd list apppool /config /xml > C:\apppools.xml
  9.  
  10. REM Import all the Application Pools:
  11. %windir%\system32\inetsrv\appcmd add apppool /in < C:\apppools.xml
  12.  
  13. REM Export all Websites:
  14. %windir%\system32\inetsrv\appcmd list site /config /xml > C:\sites.xml
  15.  
  16. REM Import all Websites:
  17. %windir%\system32\inetsrv\appcmd add site /in < C:\sites.xml
  18.  
  19. REM Recycle Individual App Pool
  20. %windir%\system32\inetsrv\appcmd.exe recycle apppool /apppool.name:DefaultAppPool
  21.  
  22. REM When importing web sites on another host, note the IP bindings will be incorrect and may need to be adjusted
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement