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,如需轉載請自行聯系原作者