天天看点

2008R2core模式下安装PowerShell[为企业部署Windows Server 2008系列十一]

windows server 2008 R2版本发布一段时间了,再三斟酌后还是决定将2008R2的应用也写进本次2008主题中来。

很多朋友喜欢core模式,甚至喜欢命令行,那么安装了core模式的你,再给core模式的2008R2安装上PowerShell 那真是将命令行发挥到极致了(帅呆了!!)。

对,我也是这样想的!

那么下面我们一起来看看如何在core模式下安装PowerShell:

第一步:用下面的命令列出当前服务器的功能和状态:

DISM /Online /Get-Features

<a href="http://angerfire.blog.51cto.com/attachment/200909/8/198455_12524232124eQf.png"></a>

第二步:启用 NetFx2-ServerCore 的功能:

DISM /Online /Enable-Feature /FeatureName: NetFx2-ServerCore

<a href="http://angerfire.blog.51cto.com/attachment/200909/8/198455_1252423218iGWZ.png"></a>

第三步:启用PowerShell功能:

DISM /Online /Enable-Feature /FeatureName: MicrosoftWindowsPowerShell

<a href="http://angerfire.blog.51cto.com/attachment/200909/8/198455_1252423243nyXq.png"></a>

完成了上面三步后,我们就可以切换到PowerShell的安装目录尽情的使用她了:

cd c:\windows\system32\windowsPowerShell\v1.0

PowerShell

<a href="http://angerfire.blog.51cto.com/attachment/200909/8/198455_12524232462phV.png"></a>

总结:其实在上面步骤中,安装PowerShell只需要两条命令:“DISM /Online /Enable-Feature /FeatureName: NetFx2-ServerCore”、“DISM /Online /Enable-Feature /FeatureName: MicrosoftWindowsPowerShell”。

而上述命令中的DISM是2008R2系统中才有的一条映像文件管理命令。

本文转自 angerfire 51CTO博客,原文链接:http://blog.51cto.com/angerfire/200165,如需转载请自行联系原作者

继续阅读