 {"id":8940,"date":"2019-07-09T04:37:14","date_gmt":"2019-07-09T11:37:14","guid":{"rendered":"https:\/\/moderneuc.com\/?p=8940"},"modified":"2026-02-18T13:02:26","modified_gmt":"2026-02-18T20:02:26","slug":"gathering-existing-devices-windows-autopilot-device-ids","status":"publish","type":"post","link":"https:\/\/jorgep.com\/blog\/gathering-existing-devices-windows-autopilot-device-ids\/","title":{"rendered":"Gathering Existing Devices Windows Autopilot Device IDs"},"content":{"rendered":"\n<p>Update 8\/1\/2020:     Microsoft has updated <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.microsoft.com\/en-us\/mem\/autopilot\/existing-devices\" target=\"_blank\">their official blog post<\/a> a number of times since this post to include automated ways from Intune and ConfigManager.  <\/p>\n\n\n\n<p>We have <a href=\"https:\/\/jorgep.com\/blog\/tag\/windows-autopilot\/\">published a number of posts <\/a>about what Windows Autopilot is and how to setup and test.    Now that so many organizations have taken note of Modern Device Management advantages they want to know how to include those devices into the Windows Autopilot.<\/p>\n\n\n\n<p>It needs to be clarified that Modern Devices Management in the context of Windows Autopilot, is comprised of three parts: <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Device Registration <\/li><li>Device Enrollment <\/li><li>Device Provisioning<\/li><\/ol>\n\n\n\n<p>This article relates to step 1)  for existing devices within an organization.   Specifically the question it is trying to answer is:  <\/p>\n\n\n\n<p><em>Is there a way we can generate the IDs without someone sitting down in front of hundreds \/ thousand of individual machines and manually starting the  PowerShell script?<\/em><\/p>\n\n\n\n<p>Here is high level steps  what I have seen done out there: <\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Preparation<\/h2>\n\n\n\n<p>First,  Download the Microsoft published <a href=\"https:\/\/www.powershellgallery.com\/packages\/Get-WindowsAutoPilotInfo\/\">Get-WindowsAutoPilotInfo PowerShell script<\/a>.    <\/p>\n\n\n\n<p><em>Note: there are no specific dependencies needed to run the it works on Windows 10 and Windows 7 devices and it uses WMI to retrieve the information needed and it saves it to text file in csv format.<\/em>   <\/p>\n\n\n\n<p>If you want to execute it everywhere, you will need to place the script on a network or shared location  available to all target devices. <\/p>\n\n\n\n<p>Alternatively you can prepare a software distribution package (in SCCM, Intune or similar)  and deploy it to all target devices so it is present there. <\/p>\n\n\n\n<p class=\"has-small-font-size\">Note:    If you are trying to gather the hardware details remotely, you will need to make sure that the Windows Firewall enables access to WMI.&nbsp;   You can do this via  Group Policy  or manually.    &#8211; Source:  <a href=\"https:\/\/blogs.technet.microsoft.com\/mniehaus\/2017\/12\/12\/gathering-windows-autopilot-hardware-details-from-existing-machines\/\">Dec 17, 2017 blog post from Michael Niehaus<\/a>  <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Script Execution<\/h2>\n\n\n\n<p>For each device you want to gather the Windows Autopilot Device ID, execute the&nbsp;PowerShell script to generate the file with the unique device information.<\/p>\n\n\n\n<p>By default the script will create the file  on the location you are executing this from, but  you use the -output switch to redirect the file. Something like this: <\/p>\n\n\n\n<p class=\"has-small-font-size\"><strong><em>Get-WindowsAutoPilotInfo.ps1 -OutputFile C:\\Windows\\Temp\\MyComputer.csv<\/em><\/strong><em>&nbsp;<\/em>Copy \/ rename each file      into a central location on your network <\/p>\n\n\n\n<p>You now have a csv file with device ID and related information  on each device.  <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Data Collection<\/h2>\n\n\n\n<p>If you chose to keep the data on the individual devices, then you need to collect the data from it and move it into a central location.  You now can do this with a copy \/ rename  commands and\/or execute it from   \u201cpull data\u201d &nbsp;collection via SCCM .<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Data Consolidation<\/h2>\n\n\n\n<p>Once you have collected the files for the devices you want, into a single location, the next step is to aggregate all the individual files into one single file:    A PowerShell script to append files in directory should suffice. <\/p>\n\n\n\n<p>     &nbsp;filename1.csv+filename2.csv+\u2026filename.csv &nbsp;<\/p>\n\n\n\n<p>Note:   as of version 1.1. of the Autopilot Script, there was a -Append switch that if you use in combination with the -outputfile switch, you could save some time    ** IMPORTANT: be aware of file locking!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Register the Devices<\/h2>\n\n\n\n<p>Final step is to import into the Windows Autopilot Device Registration dashboard.   You can do this by going into the dashboard, device registration click on the upload a file, select the one single file you just created. <\/p>\n\n\n\n<p>Devices have been registered, but have not yet been enrolled into Intune.   <\/p>\n\n\n\n<p>will still need to do \u201call things\u201d Intune to the freshly register devices, but you do not have to do until you are ready to&nbsp; manage with MDM.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Alternatives and Improvements<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>A great July 2018 blog post by Oliver  Kieselbach, <a href=\"https:\/\/oliverkieselbach.com\/2018\/07\/17\/automation-of-gathering-and-importing-windows-autopilot-information\/\">Automation of gathering and importing Windows Autopilot&nbsp;information<\/a>  shows a way to do this using Azure blob storage using AzCopy.     Great read to automate the process &#8211; Nicely documented!<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Further Reading<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Microsoft Documentation:  <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/deployment\/windows-autopilot\/existing-devices\">Windows Autopilot for existing devices <\/a><\/li><li><a href=\"https:\/\/www.robinhobo.com\/how-to-setup-windows-autopilot-and-add-existing-devices-the-quickest-way\/\">How to setup Windows AutoPilot and add existing devices the quickest way<\/a><\/li><li><a href=\"https:\/\/msendpointmgr.com\/2018\/07\/23\/automation-of-gathering-and-importing-windows-autopilot-information\/\">Automation of gathering and importing Windows Autopilot information &#8211; MSEndpointMgr<\/a><\/li><li><a href=\"https:\/\/www.imab.dk\/autopilot-for-existing-devices-move-from-windows-7-to-modern-co-managed-windows-10-using-configmgr\/\">AutoPilot for existing devices: Move from Windows 7 to modern Co-managed Windows 10 in a jiffy using ConfigMgr<\/a><\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update 8\/1\/2020: Microsoft has updated their official blog post a number of times since this post to include automated ways from Intune and ConfigManager. We have published a number of posts about what Windows Autopilot is and how to setup and test. Now that so many organizations have taken note of Modern Device Management advantages&#8230;<\/p>\n","protected":false},"author":2,"featured_media":368733,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","ngg_post_thumbnail":0,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[681,441],"tags":[737,739,742,769,326,430,782],"class_list":["post-8940","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-moderneuc2","category-tech-talk","tag-modern-device-management","tag-modern-provisioning","tag-moderneuc1","tag-uem","tag-windows","tag-windows-10","tag-windows-autopilot"],"taxonomy_info":{"category":[{"value":681,"label":"ModernEUC"},{"value":441,"label":"Tech Talk"}],"post_tag":[{"value":737,"label":"Modern Device Management"},{"value":739,"label":"Modern Provisioning"},{"value":742,"label":"ModernEUC"},{"value":769,"label":"UEM"},{"value":326,"label":"Windows"},{"value":430,"label":"Windows 10"},{"value":782,"label":"Windows Autopilot"}]},"featured_image_src_large":["https:\/\/jorgep.com\/blog\/wp-content\/uploads\/WindowsAutopilot-656x300-updraft-pre-smush-original.png",532,243,false],"author_info":{"display_name":"Jorge Pereira","author_link":"https:\/\/jorgep.com\/blog\/author\/jorge\/"},"comment_info":0,"category_info":[{"term_id":681,"name":"ModernEUC","slug":"moderneuc2","term_group":0,"term_taxonomy_id":691,"taxonomy":"category","description":"","parent":0,"count":261,"filter":"raw","cat_ID":681,"category_count":261,"category_description":"","cat_name":"ModernEUC","category_nicename":"moderneuc2","category_parent":0},{"term_id":441,"name":"Tech Talk","slug":"tech-talk","term_group":0,"term_taxonomy_id":451,"taxonomy":"category","description":"","parent":0,"count":684,"filter":"raw","cat_ID":441,"category_count":684,"category_description":"","cat_name":"Tech Talk","category_nicename":"tech-talk","category_parent":0}],"tag_info":[{"term_id":737,"name":"Modern Device Management","slug":"modern-device-management","term_group":0,"term_taxonomy_id":747,"taxonomy":"post_tag","description":"","parent":0,"count":23,"filter":"raw"},{"term_id":739,"name":"Modern Provisioning","slug":"modern-provisioning","term_group":0,"term_taxonomy_id":749,"taxonomy":"post_tag","description":"","parent":0,"count":14,"filter":"raw"},{"term_id":742,"name":"ModernEUC","slug":"moderneuc1","term_group":0,"term_taxonomy_id":752,"taxonomy":"post_tag","description":"","parent":0,"count":285,"filter":"raw"},{"term_id":769,"name":"UEM","slug":"uem","term_group":0,"term_taxonomy_id":779,"taxonomy":"post_tag","description":"","parent":0,"count":47,"filter":"raw"},{"term_id":326,"name":"Windows","slug":"windows","term_group":0,"term_taxonomy_id":336,"taxonomy":"post_tag","description":"","parent":0,"count":93,"filter":"raw"},{"term_id":430,"name":"Windows 10","slug":"windows-10","term_group":0,"term_taxonomy_id":440,"taxonomy":"post_tag","description":"","parent":0,"count":78,"filter":"raw"},{"term_id":782,"name":"Windows Autopilot","slug":"windows-autopilot","term_group":0,"term_taxonomy_id":792,"taxonomy":"post_tag","description":"","parent":0,"count":23,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts\/8940","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/comments?post=8940"}],"version-history":[{"count":1,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts\/8940\/revisions"}],"predecessor-version":[{"id":518886,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts\/8940\/revisions\/518886"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/media\/368733"}],"wp:attachment":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/media?parent=8940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/categories?post=8940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/tags?post=8940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}