PowerShell: Load WebAdministration in ps1 script on both IIS 7 and IIS 7.5

前端 未结 6 1755
猫巷女王i
猫巷女王i 2021-01-31 04:57

I have a PowerShell script that configures web site and web application settings in IIS. So I use the cmdlets in the WebAdministration snap in. But this script needs to run on

6条回答
  •  不要未来只要你来
    2021-01-31 05:24

    If you want to create "pre-configured" PowerShell sessions, look into PowerShell console files e.g.:

    man Export-Console -full
    

    You can create one for use on Win7 and Server 2008 R2 and another for use on Server08.

提交回复
热议问题