[英]Powershell command to export IIS websites and app pools of a remote server
[英]Auto configuring IIS websites / app pools using PowerShell or other scripts
我們的項目中需要自動化在IIS中創建AppPool和網站的過程。 我們想編寫一些批處理腳本來完成此任務。 從我的研究中,我發現PowerShell具有可以使用的命令。 但是,當我嘗試在Windows Server 2012上的PowerShell中運行IIS模塊命令時,它無法識別該命令。 此功能僅適用於Windows 7 / IIS 7是否正確? Windows 2012 R2 / IIS 8上現在也可以使用它嗎?如果可以,我在哪里可以找到適當的文檔和幫助?
Windows 8 / 8.1和Windows Server 2012/2012 R2中當然提供了此功能。
您可能忘記了在執行其他IIS cmdlet之前運行Add-PSSnapin WebAdministration
。
您可以在Microsoft Technet上找到完整的文檔。
如果您運行Windows 8.1或Windows Server 2012 R2(即具有Windows PowerShell 4.0),則還可以將新的PowerShell所需狀態配置功能與xWebAdministration模塊一起使用來創建WebAppPool和網站。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.