如何通过Powershell启用Windows功能
发布时间:2020-12-13 20:24:15 所属栏目:Windows 来源:网络整理
导读:我需要使用Powershell启用两个Windows功能.但我不知道他们的名字或如何找到他们. 到目前为止,我已经设法安装IIS,并使用脚本发现here停止默认应用程序池. function InstallFeature($name) { cmd /c "ocsetup $name /passive"}InstallFeature IIS-WebServerRol
我需要使用Powershell启用两个Windows功能.但我不知道他们的名字或如何找到他们.
到目前为止,我已经设法安装IIS,并使用脚本发现here停止默认应用程序池. function InstallFeature($name) { cmd /c "ocsetup $name /passive" } InstallFeature IIS-WebServerRole InstallFeature IIS-WebServer InstallFeature IIS-CommonHttpFeatures InstallFeature IIS-DefaultDocument InstallFeature IIS-DirectoryBrowsing InstallFeature IIS-HttpErrors InstallFeature IIS-HttpRedirect InstallFeature IIS-StaticContent InstallFeature IIS-HealthAndDiagnostics InstallFeature IIS-CustomLogging InstallFeature IIS-HttpLogging InstallFeature IIS-HttpTracing InstallFeature IIS-LoggingLibraries InstallFeature IIS-Security InstallFeature IIS-RequestFiltering InstallFeature IIS-WindowsAuthentication InstallFeature IIS-ApplicationDevelopment InstallFeature IIS-NetFxExtensibility InstallFeature IIS-ISAPIExtensions InstallFeature IIS-ISAPIFilter InstallFeature IIS-ASPNET InstallFeature IIS-WebServerManagementTools InstallFeature IIS-ManagementConsole InstallFeature IIS-ManagementScriptingTools import-module WebAdministration Stop-WebAppPool DefaultAppPool 解 寻找: Get-WindowsFeature *ASP* Get-WindowsFeature *activation* 安装: Add-WindowsFeature NET-Framework-45-ASPNET Add-WindowsFeature NET-HTTP-Activation
如果您在Windows 2008R2中有一个模块:
导入模块服务器管理器 此模块导出3个cmdlet:Get-WindowsFeature,Add-WindowsFeature和remove-WindowsFeature 所以你可以做一些像get-windowsfeature * frame *列出.net功能,并通过命令安装它添加WindowsFeature网络框架 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 如何在Windows Active Directory中显示网络连接的打印机?
- 在Windows命令提示符/ PowerShell中下载大文件
- windows-server-2008 – 在服务器2008 R2中,如果我以管理员
- windows-server-2008-r2 – 在静态IP地址连接上设置特定的D
- Windows批处理脚本 – 将文件名读入变量
- 在Windows 10上安装Git 1.9.5
- 使用带Stretch的图像控制= UniformToFill – WP7
- 虚拟机中的win10网络配置
- windows-server-2003 – 如何从命令行启用BSOD上的系统重启
- 将DLL附加到ASP.NET站点
推荐文章
站长推荐
热点阅读