<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[gOxiA=苏繁=SuFan Blog]]></title> 
<link>https://maytide.net/index.php</link> 
<description><![CDATA[gOxiA,苏繁,sufan,Microsoft MVP]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[gOxiA=苏繁=SuFan Blog]]></copyright>
<item>
<link>https://maytide.net/read.php/1713.htm</link>
<title><![CDATA[[Tips]从初始 ServerCore 模式向 FullServer 转换]]></title> 
<author>gOxiA &lt;sufan_cn@msn.com&gt;</author>
<category><![CDATA[Windows Server]]></category>
<pubDate>Sun, 09 Feb 2014 07:07:03 +0000</pubDate> 
<guid>https://maytide.net/read.php/1713.htm</guid> 
<description>
<![CDATA[ 
	<p><a href="http://goxia.maytide.net/ftpupfiles/WS_C123/ws2012r2-logo.png"><img title="ws2012r2-logo" border="0" alt="ws2012r2-logo" src="http://goxia.maytide.net/ftpupfiles/WS_C123/ws2012r2-logo_thumb.png" width="315" height="55"></a></p> <p><font color="#fd3f0d" size="4"><strong>从初始 ServerCore 模式向 FullServer 转换</strong></font></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 还记得 12年12月 <a href="http://goxia.maytide.net/" target="_blank">gOxiA</a> 与大家分享的两篇关于 Windows Server 2012 运行模式的文章“<a href="http://goxia.maytide.net/read.php/1642.htm" target="_blank">HOWTO：切换至 Windows Server 2012 的 Minimal Server 模式</a>”、“<a href="http://goxia.maytide.net/read.php/1641.htm" target="_blank">Windows Server 2012 的四种运行界面模式</a>”，介绍了 Windows Server 2012 如何在几个运行界面模式下进行转换。当时的测试都是基于初始 FullServer 模式进行的，即：带有 GUI 的服务器完整模式。所以当我们执行模式转换时并不会遇到问题，如果 Windows Server 初始安装时是 ServerCore 模式，那么当我们要向 Minimal 或 FullServer 转换时就会遇到错误，如下图所示：</p> <p><a href="http://goxia.maytide.net/ftpupfiles/Tips_C747/1.png"><img title="1" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="1" src="http://goxia.maytide.net/ftpupfiles/Tips_C747/1_thumb.png" width="634" height="476"></a></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 出现这个错误的原因是以前的 Windows 版本中，即使禁用了某个服务器角色或功能，相应的二进制文件仍会保留在磁盘上，占用着磁盘空间，当然这一特性也使我们在日后重复安装角色或功能时而无需提供安装源。但在 Windows Server 2012 中则又有所改变，用户不仅可以禁用某个角色或功能，还可以完全删除相应的文件。即：要完全删除某个角色或功能时，在 Uninstall-WindowsFeature 中使用<font style="background-color: #ffff00"> –Remove</font> 参数。</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 正因为如此，当 Windows Server 初始安装选择的是 ServerCore 模式时，一些角色或功能的二进制文件并未存储在当前系统中，所以当使用常规命令行进行安装时便会出现错误。所以我们需要在执行 Install-WindowsFeature 时使用 –source 参数指定安装源。完整的命令行参考如下：</p> <p><div class="code">Install-WindowsFeature server-gui-mgmt-infra –source wim:d:\sources\install.wim:2</div></p> <p><a href="http://goxia.maytide.net/ftpupfiles/Tips_C747/2.png"><img title="2" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="2" src="http://goxia.maytide.net/ftpupfiles/Tips_C747/2_thumb.png" width="634" height="476"></a></p> <p><a href="http://goxia.maytide.net/ftpupfiles/Tips_C747/3.png"><img title="3" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="3" src="http://goxia.maytide.net/ftpupfiles/Tips_C747/3_thumb.png" width="634" height="476"></a></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 其中，结尾“:2”为 Install.wim 映像索引 2，即 Windows Server 2012 R2 Standard，与本例初始安装的系统版本对应，如果需要确认 WIM 文件的信息，可以参考如下命令行：</p> <p><div class="code">dism /get-wiminfo /wimfile:d:\sources\install.wim</div></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 查阅 <a href="http://technet.microsoft.com/zh-cn/library" target="_blank">TechNet Library</a>&nbsp;<a href="http://technet.microsoft.com/zh-cn/library/jj574205.aspx" target="_blank">管理服务器核心服务器</a> 资料，发现在 <a href="http://technet.microsoft.com/zh-cn/library/jj574205.aspx#BKMK_1_6" target="_blank">1.5 转换成“完全安装”模式</a> 小节中提到如果希望使用 Windows 更新而不是某个 WIM 文件作为源，则只需要为 Install-WindowsFeature 使用 –Restart 参数，安装时便会自动从微软官方站点获取更新文件。（PS：有意思的方式，-Restart 可是重启参数啊！！！）不过实际测试此种方式并不实用，网络速度是最大的瓶颈！</p> <p><a href="http://goxia.maytide.net/ftpupfiles/Tips_C747/4.png"><img title="4" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="4" src="http://goxia.maytide.net/ftpupfiles/Tips_C747/4_thumb.png" width="633" height="476"></a></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 解决了一个小小的问题，却积累了多个经验！</p>
]]>
</description>
</item><item>
<link>https://maytide.net/read.php/1713.htm#blogcomment5098</link>
<title><![CDATA[[评论] [Tips]从初始 ServerCore 模式向 FullServer 转换]]></title> 
<author>aa &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 25 May 2015 03:46:23 +0000</pubDate> 
<guid>https://maytide.net/read.php/1713.htm#blogcomment5098</guid> 
<description>
<![CDATA[ 
	感谢分享，解决了困扰多日的问题，谢谢
]]>
</description>
</item>
</channel>
</rss>