从WindowsServer2008R2取消IIS时要小心:
管理控制台”。如果发生以下情况:在目标“ [.NET Framework 3.5.1功能]上执行“ Remove-WindowsFeature”操作
import-module servermanager
PS C:\Users\****> remove-windowsfeature web-server -whatif
What if: Checking if running in 'WhatIf' Mode.
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] IIS 6 Management Console".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] Tracing".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] Windows Authentication".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] CGI".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] ISAPI Extensions".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] ISAPI Filters".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] IIS 6 Metabase Compatibility".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] IIS 6 WMI Compatibility".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] IIS 6 Scripting Tools".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] Request Filtering".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] Static Content Compression".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] Dynamic Content Compression".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] Directory Browsing".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] HTTP Errors".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] Default Document".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] HTTP Logging".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] Static Content".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] HTTP Redirection".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] .NET Extensibility".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] ASP.NET".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] ASP".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] IIS Management Scripts and Tools".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] Management Service".
What if: Performing operation "Remove-WindowsFeature" on Target "[Web Server (IIS)] IIS Management Console".
What if: Performing operation "Remove-WindowsFeature" on Target "[.NET Framework 3.5.1 Features] HTTP Activation".
What if: This server may need to be restarted after the removal completes.
Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
True Maybe Success {}