<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[gOxiA=苏繁=SuFan Blog]]></title> 
<link>https://sufan.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://sufan.maytide.net/read.php/1995.htm</link>
<title><![CDATA[[Intune] 使用 Get-WindowsAutopilotInfo 直接向 Windows Autopilot 注册设备]]></title> 
<author>gOxiA &lt;sufan_cn@msn.com&gt;</author>
<category><![CDATA[Microsoft Cloud]]></category>
<pubDate>Tue, 29 Sep 2020 08:18:24 +0000</pubDate> 
<guid>https://sufan.maytide.net/read.php/1995.htm</guid> 
<description>
<![CDATA[ 
	<p><img alt="logo_intune" src="http://goxia.maytide.net/ftpup/2018/83837cef08fa_F50A/logo_intune_thumb.png"></p>&nbsp;&nbsp;<p><font color="#fd3f0d" size="4"><strong>使用 Get-WindowsAutopilotInfo 直接向 Windows Autopilot 注册设备</strong></font></p>&nbsp;&nbsp;<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 如果你还记得这篇文章“<a href="https://goxia.maytide.net/read.php/1946.htm">HOWTO: 收集 DeviceID 用于测试 Windows Autopilot</a>”，应该不会对 <a href="https://www.powershellgallery.com/packages/Get-WindowsAutoPilotInfo" target="_blank">Get-WindowsAutopilotInfo</a> 感到陌生。利用 Get-WindowsAutopilotInfo 可以收集设备的 DeviceID，然后参考“<a href="https://goxia.maytide.net/read.php/1957.htm">HOWTO: 将收集的 Windows Autopilot DeviceID 添加到 Intune</a>”注册到 Windows Autopilot 执行部署。</p>&nbsp;&nbsp;<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 将 DeviceID 添加到 Intune 的步骤还是比较繁琐的，现在 Get-WindowsAutopilotInfo 可以直接注册设备，这极大简化了测试过程。</p>&nbsp;&nbsp;<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 让我们重温一下 Get-WindowsAutopilotInfo 的获取步骤：</p>&nbsp;&nbsp;<p>1. 在 PowerShell 命令提示符下执行如下命令行，以安装 Get-WindowsAutopilotInfo。</p>&nbsp;&nbsp;<p><div class="code">Install-Script –Name Get-WindowsAutopilotInfo –force</div></p>&nbsp;&nbsp;<p>备注：使用“-RequiredVersion X.X”可以指定要安装的版本，如果之前已经安装了旧版，请务必使用 –force 参数，更详细的参数介绍可参考官方文档“<a href="https://docs.microsoft.com/zh-cn/powershell/module/PowershellGet/Install-Script?view=powershell-5.1/?WT.mc_id=WDIT-MVP-4000544" target="_blank">Install-Script</a>”。</p>&nbsp;&nbsp;<p>2. 为了能够执行该脚本，需要修改本地的安全策略。</p>&nbsp;&nbsp;<p><div class="code">Set-ExecutionPolicy Unrestricted</div></p>&nbsp;&nbsp;<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Get-WindowsAutopilotInfo 准备完毕后，可以事先创建一个设备组并匹配到 Windows Autopilot 配置文件，本例中 gOxiA 创建了一个特定厂商设备的动态组，如下图所示，有关设备组的创建可参考“<a href="https://goxia.maytide.net/read.php/1958.htm">HOWTO: 在 Intune 中为 Windows Autopilot 部署创建设备组</a>”。</p>&nbsp;&nbsp;<p><a href="http://goxia.maytide.net/ftpup/2018/Intune--Get-WindowsAutopilotInfo--Window_CF9F/image.png"><img width="634" height="313" title="image" style="display: inline; background-image: none;" alt="image" src="http://goxia.maytide.net/ftpup/2018/Intune--Get-WindowsAutopilotInfo--Window_CF9F/image_thumb.png" border="0"></a></p>&nbsp;&nbsp;<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 现在我们可以执行以下命令行，来获取 DeviceID 并注册到 Windows Autopilot，也可同时分配到指定组，并等待配置文件分配。</p>&nbsp;&nbsp;<p><div class="code">Get-WindowsAutopilotInfo –Online –AddToGroup “Surface” –Assign</div></p>
]]>
</description>
</item>
</channel>
</rss>