使用管理员身份运行cmd

应用程序池:

# 导出所有应用程序池
%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\apppools.xml

# 导入所有应用程序池
%windir%\system32\inetsrv\appcmd add apppool /in < c:\apppools.xml

站点:

# 导出所有站点
%windir%\system32\inetsrv\appcmd list site /config /xml > c:\sites.xml

# 导入所有站点
%windir%\system32\inetsrv\appcmd add site /in < c:\sites.xml

 

针对单独的站点导入和导出

 
# 导出单独的应用程序池
%windir%\system32\inetsrv\appcmd list apppool "应用程序池名称" /config /xml > c:\myapppool.xml

# 导入单独的应用程序池
%windir%\system32\inetsrv\appcmd add apppool /in < c:\myapppool.xml

# 导出单独站点
%windir%\system32\inetsrv\appcmd list site "站点名称" /config /xml > c:\mywebsite.xml

# 导入单独站点
%windir%\system32\inetsrv\appcmd add site /in < c:\mywebsite.xml
 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-05-28
  • 2021-08-18
  • 2021-11-07
猜你喜欢
  • 2021-05-13
  • 2021-11-11
  • 2021-08-31
  • 2021-10-29
  • 2022-12-23
  • 2021-05-28
  • 2022-01-10
相关资源
相似解决方案