[Tips] 定制 Windows10 开始界面时 Import-StartLayout 的常见问题
定制 Windows10 开始界面时 Import-StartLayout 的常见问题
在部署 Windows 10 前,IT人员通常会生成自定义的 Windows 10 参考映像,为了提升用户体验并满足企业桌面标准化,都会对 Windows 10 的开始界面进行定制,添加符合规范的程序图标并进行分组排列和组合。想必大家已经踩坑,自 16299 开始通过在应答文件中启用 CopyProfile 来实现开始界面的统一已经失效,所以必须借助组策略强制部署 StartLayout,或通过 PPKG 实现。当然,也可以使用 Import-StartLayout 导入 StartLayout.xml 为用户指定默认的开始界面布局,但是该方法对已生成用户配置文件的用户是无效的。对于不能通过组策略实现开始界面统一部署的用户,在 OOBE 阶段使用 Import-StartLayout 也是一个不错的选择,gOxiA 就是通过这个方法实现所有新登录用户使用统一的开始界面布局。
但是在实践 Import-StartLayout 过程中,也遇到一些比较典型的问题,会比较常见,特以此文分享于大家。
Import-StartLayout 命令行通常为“Import-StartLayout -LayoutPath C:\startlayout.xml -MountPath C:\”,其中 -LayoutPath 是指定开始界面布局配置文件所在路径,-MountPath 是指定系统卷。在上面的截图中有展示的是三个常见故障:
- Import-StartLayout :文件 不是有效的布局文件
该问题通常是因为修改了 StartLayout.xml 导致的,其中包含了未满足规范的语句,这就需要进行具体的检查。 - Import-StartLayout :未能找到路径 的一部分
其中路径类似“D:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml”,通常这个故障是因为 IT人员在 Unattend 中重新指定了用户配置文件目录导致的,开始界面定制文件默认会应用到 Default 对应目录中,所以处理该故障就要先确定 Default 所在的卷。 - Import-StartLayout :对路径 的访问被拒绝
此故障很容易理解,要执行 Import-StartLayout 需要管理员权限运行,如果系统启用了 UAC,要执行它就必须提权运行。
最后,额外分享一下开始界面布局文件中需要注意的事项,有些 IT人员会在布局配置中添加任务栏图标的定制(CustomTaskbarLayoutCollection),那么必须要对 CustomTaskLayoutCollection 进行声明,即添加“xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout"”。
Windows KMS Client Setup Keys
备忘专用,以后没有大的变更,将仅更新这篇日志。
Windows Server, version 1709
Operating system edition | KMS Client Setup Key |
---|---|
Windows Server Datacenter | 6Y6KB-N82V8-D8CQV-23MJW-BWTG6 |
Windows Server Standard | DPCNP-XQFKJ-BJF7R-FRC8D-GF6G4 |
Windows Server 2016
Operating system edition | KMS Client Setup Key |
---|---|
Windows Server 2016 Datacenter | CB7KF-BWN84-R7R2Y-793K2-8XDDG |
Windows Server 2016 Standard | WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY |
Windows Server 2016 Essentials | JCKRF-N37P4-C2D82-9YXRT-4M63B |
Windows 10, version 1709
Operating system edition | KMS Client Setup Key |
---|---|
Windows 10 Professional Workstation | NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J |
Windows 10 Professional Workstation N | 9FNHH-K3HBT-3W4TD-6383H-6XYWF |
Windows 10
Operating system edition | KMS Client Setup Key |
---|---|
Windows 10 Professional | W269N-WFGWX-YVC9B-4J6C9-T83GX |
Windows 10 Professional N | MH37W-N47XK-V7XM9-C7227-GCQG9 |
Windows 10 Enterprise | NPPR9-FWDCX-D2C8J-H872K-2YT43 |
Windows 10 Enterprise N | DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4 |
Windows 10 Education | NW6C2-QMPVW-D7KKK-3GKT6-VCFB2 |
Windows 10 Education N | 2WH4N-8QGBV-H22JP-CT43Q-MDWWJ |
Windows 10 Enterprise 2015 LTSB | WNMTR-4C88C-JK8YV-HQ7T2-76DF9 |
Windows 10 Enterprise 2015 LTSB N | 2F77B-TNFGY-69QQF-B8YKP-D69TJ |
Windows 10 Enterprise 2016 LTSB | DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ |
Windows 10 Enterprise 2016 LTSB N | QFFDN-GRT3P-VKWWX-X7T3R-8B639 |
Windows Server 2012 R2 and Windows 8.1
Operating system edition | KMS Client Setup Key |
---|---|
Windows 8.1 Professional | GCRJD-8NW9H-F2CDX-CCM8D-9D6T9 |
Windows 8.1 Professional N | HMCNV-VVBFX-7HMBH-CTY9B-B4FXY |
Windows 8.1 Enterprise | MHF9N-XY6XB-WVXMC-BTDCT-MKKG7 |
Windows 8.1 Enterprise N | TT4HM-HN7YT-62K67-RGRQJ-JFFXW |
Windows Server 2012 R2 Server Standard | D2N9P-3P6X9-2R39C-7RTCD-MDVJX |
Windows Server 2012 R2 Datacenter | W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9 |
Windows Server 2012 R2 Essentials | KNC87-3J2TX-XB4WP-VCPJV-M4FWM |
Windows Server 2012 and Windows 8
Operating system edition | KMS Client Setup Key |
---|---|
Windows 8 Professional | NG4HW-VH26C-733KW-K6F98-J8CK4 |
Windows 8 Professional N | XCVCF-2NXM9-723PB-MHCB7-2RYQQ |
Windows 8 Enterprise | 32JNW-9KQ84-P47T8-D8GGY-CWCK7 |
Windows 8 Enterprise N | JMNMF-RHW7P-DMY6X-RF3DR-X2BQT |
Windows Server 2012 | BN3D2-R7TKB-3YPBD-8DRP2-27GG4 |
Windows Server 2012 N | 8N2M2-HWPGY-7PGT9-HGDD8-GVGGY |
Windows Server 2012 Single Language | 2WN2H-YGCQR-KFX6K-CD6TF-84YXQ |
Windows Server 2012 Country Specific | 4K36P-JN4VD-GDC6V-KDT89-DYFKP |
Windows Server 2012 Server Standard | XC9B7-NBPP2-83J2H-RHMBY-92BT4 |
Windows Server 2012 MultiPoint Standard | HM7DN-YVMH3-46JC3-XYTG7-CYQJJ |
Windows Server 2012 MultiPoint Premium | XNH6W-2V9GX-RGJ4K-Y8X6F-QGJ2G |
Windows Server 2012 Datacenter | 48HP8-DN98B-MYWDG-T2DCC-8W83P |
Windows 7 and Windows Server 2008 R2
Operating system edition | KMS Client Setup Key |
---|---|
Windows 7 Professional | FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4 |
Windows 7 Professional N | MRPKT-YTG23-K7D7T-X2JMM-QY7MG |
Windows 7 Professional E | W82YF-2Q76Y-63HXB-FGJG9-GF7QX |
Windows 7 Enterprise | 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH |
Windows 7 Enterprise N | YDRBP-3D83W-TY26F-D46B2-XCKRJ |
Windows 7 Enterprise E | C29WB-22CC8-VJ326-GHFJW-H9DH4 |
Windows Server 2008 R2 Web | 6TPJF-RBVHG-WBW2R-86QPH-6RTM4 |
Windows Server 2008 R2 HPC edition | TT8MH-CG224-D3D7Q-498W2-9QCTX |
Windows Server 2008 R2 Standard | YC6KT-GKW9T-YTKYR-T4X34-R7VHC |
Windows Server 2008 R2 Enterprise | 489J6-VHDMP-X63PK-3K798-CPX3Y |
Windows Server 2008 R2 Datacenter | 74YFP-3QFB3-KQT8W-PMXWJ-7M648 |
Windows Server 2008 R2 for Itanium-based Systems | GT63C-RJFQ3-4GMB6-BRFB9-CB83V |
Windows Vista and Windows Server 2008
Operating system edition | KMS Client Setup Key |
---|---|
Windows Vista Business | YFKBB-PQJJV-G996G-VWGXY-2V3X8 |
Windows Vista Business N | HMBQG-8H2RH-C77VX-27R82-VMQBT |
Windows Vista Enterprise | VKK3X-68KWM-X2YGT-QR4M6-4BWMV |
Windows Vista Enterprise N | VTC42-BM838-43QHV-84HX6-XJXKV |
Windows Web Server 2008 | WYR28-R7TFJ-3X2YQ-YCY4H-M249D |
Windows Server 2008 Standard | TM24T-X9RMF-VWXK6-X8JC9-BFGM2 |
Windows Server 2008 Standard without Hyper-V | W7VD6-7JFBR-RX26B-YKQ3Y-6FFFJ |
Windows Server 2008 Enterprise | YQGMW-MPWTJ-34KDK-48M3W-X4Q6V |
Windows Server 2008 Enterprise without Hyper-V | 39BXF-X8Q23-P2WWT-38T2F-G3FPG |
Windows Server 2008 HPC | RCTX3-KWVHP-BR6TB-RB6DM-6X7HP |
Windows Server 2008 Datacenter | 7M67G-PC374-GR742-YH8V4-TCBY3 |
Windows Server 2008 Datacenter without Hyper-V | 22XQ2-VRXRG-P8D42-K34TD-G3QQC |
Windows Server 2008 for Itanium-Based Systems | 4DWFP-JF3DJ-B7DTH-78FJB-PDRHK |
HOWTO: 通过 Remote Desktop (RDP) 远程访问 Hyper-V 下的虚拟机
HOWTO: 通过 Remote Desktop (RDP) 远程访问 Hyper-V 下的虚拟机
Remote Desktop 是 Windows 的远程桌面工具,通过 RDP 远程访问 Windows 计算机,可在 Windows 桌面下执行管理操作。那么它又是怎么跟 Hyper-V 扯上关系的呢?!本文 gOxiA 将分享通过 Remote Desktop 直接远程登录到 Hyper-V 下的虚拟机,对虚拟机系统执行操作。
在 Hyper-V 上如果要管理其下的虚拟机通常会在 Hyper-V 管理器下选中虚拟机(VM),并鼠标右键点击,选择“连接”。
之后 ,Hyper-V 管理器会为我们启动一个新的程序,名为 VMConnect,即虚拟机连接器。这样我们便可以像本地计算机一样去操控它。
当然,我们也可以为虚拟机启用远程桌面访问,这样便可以通过 Remote Desktop 登录。但是,前面所讲的都是面向 Windows 系统的,如果 Hyper-V 虚拟机是一个 Linux 呢???通常,接下来的解答是在 Linux 上开启 SSH 或其他远程访问服务,按照 Linux 的方案去执行。但是如果正好这个 Linux 虚拟机不能开启 SSH 怎么办?
OK,开始今天的主题!如果 Hyper-V 下的虚拟机是一个没有远程管理方案的 Linux,又或者虚拟机与客户端是隔离网络关系,那么该如何远程操控这些虚拟机系统?!
其实我们可以借助 Windows Server 2016 的 RDP 即远程桌面协议实现我们的需求。原理是客户端通过 RDP 连接到 Hyper-V Host,之后使用 RDP 作为桥去连接虚拟机的 VMMS 端口 2179,实现两端通信。(PS:默认该端口是由 VMConnect 去连接。)
要使用远程桌面来连接的具体操作步骤如下:
首先,获取要远程连接的虚拟机ID,可以通过 PowerShell 命令:get-vm | fl name,id
然后使用记事本新建一个扩展名为“.rdp”的文件,并添加如下内容:
保存后便可直接使用,以下截图是连接一台正要安装 Ubuntu 的虚拟机截图。
参考资料:https://technet.microsoft.com/en-us/library/Cc764268.aspx
Connection type | Protocol | Default port | Where to change the port setting |
---|---|---|---|
VMM server to VMM agent on Windows Server–based host (control) | WS-Management | 80 | During VMM setup, registry |
VMM server to VMM agent on Windows Server–based host (file transfers) | HTTPS (using BITS) | 443 (Maximum value: 32768) | Registry |
VMM server to remote Microsoft SQL Server database | TDS | 1433 | Registry |
VMM server to P2V source agent | DCOM | 135 | Registry |
VMM Administrator Console to VMM server | WCF | 8100 | During VMM setup, registry |
VMM Self-Service Portal Web server to VMM server | WCF | 8100 | During VMM setup |
VMM Self-Service Portal to VMM self-service Web server | HTTPS | 443 | During VMM setup |
VMM library server to hosts | BITS | 443 (Maximum value: 32768) | During VMM setup, registry |
VMM host-to-host file transfer | BITS | 443 (Maximum value: 32768) | Registry |
VMRC connection to Virtual Server host | VMRC | 5900 | VMM Administrator Console, registry |
VMConnect (RDP) to Hyper-V hosts | RDP | 2179 | VMM Administrator Console, registry |
Remote Desktop to virtual machines | RDP | 3389 | Registry |
VMware Web Services communication | HTTPS | 443 | VMM Administrator Console, registry |
SFTP file transfer from VMWare ESX Server 3.0 and VMware ESX Server 3.5 hosts | SFTP | 22 | Registry |
SFTP file transfer from VMM server to VMWare ESX Server 3i hosts | HTTPS | 443 | Registry |