Create and Import Autopilot CSV File into Intune from OOBE

Create and Import Autopilot CSV File into Intune from OOBECreate and Import Autopilot CSV File into Intune from OOBE script will download all required modules and get-windowsautopilotinfo script, create a CSV (Hash) file and import it into Intune.You can use this script to create

 
 
 
 
 
5 Star
(15)
14,514 times
Add to favorites
Windows Azure
12/9/2019
E-mail Twitter del.icio.us Digg Facebook
  • Error: Could not connect to Microsoft Graph
    6 Posts | Last post January 13, 2020
    • I downloaded the script today and get the following Error: "Error: Could not connect to Microsoft Graph. Please login with the account that has premissions to administer Intune and autopilot or verify your password"
      I habe Global Administrator Role in Azure AD. My password isn't wrong. Any tips to fix that?
    • Im getting the same error ( multiple accounts, multiple tenants ) 
    • Hi guys,
      I just tried it and everything worked. I used global admin account. One thing to keep in mind is to connect to the Microsoft graph with PS without running the script. When you do that you will be prompted to give your account permissions (I saw this one time. If your account don't have permissions you will not be able to connect). After that run the script again and check. 
    • Graph permissions doesnt pop up if using the script first. 
      
      Before executing the script do the following.
      
      Type “install-module -name Microsoft.Graph.Intune
      Accept to installing the module ( A or Y)
      Once complete
      Type “Connect-MSGraph” hit enter
      You’ll get a pop up to sign in ( global admin and password ) 
      Consent to the permissions for the org ( incase you have others doing this as well ) 
      
      Once that is all complete, you can now run the script with ease.  
      
      
      
      
    • Same problem, this is useless. 
      
      Type in the username that has premission to administer Intune and autopilot
      Enter the e-mail address of the user that has premission to administer Intune: 
      xxx@xxx
      Downloading and installing AzureAD module
      Downloading and installing get-windowsautopilotinfo script
      Connecting to Microsoft Graph
      Error: Could not connect to Microsoft Graph. Please login with the account that has premissions to administer Intune and autopilot or 
      verify your password
    • You need to configure permissions or this will never work. Read the text in red. If you are accessing MS Graph for the first time, make sure that you create application identity. Without this you will not be able to use this script. Easiest way is to download the Microsoft.Graph.Intune module and connect to ms graph before you run the script. When you do this, you will be prompted to give your account permission. After this step, you will be able to run the script. 
  • Group Tag/Order ID
    1 Posts | Last post December 21, 2019
    • Hey, awesome script! Works great. Is there an easy way to it to prompt typing in a group tag/order id so this is also connected to that machine when importing into the tenant?
      
      Thanks
  • Please update according to new WindowsAutopilot module
    3 Posts | Last post November 27, 2019
    • The WindowsAutopilotIntune module was updated recently, and doesn't include Connect-Intune anymore, but relies on Microsoft Graph.
      
      Seems to work If replacing line 44 with Connect-MSGraph.
      
      But great script - have been using with success for months :-)
      
      
    • Sadly this change didn't help in my case, script is still falling :/
    • Hi Guys,
      Script is updated. I added Microsoft.Graph.Intune module and changed login. Everything will work now. 
  • powershell gallery
    1 Posts | Last post August 08, 2019
    • thank you for this script, can you please upload it to powershell gallery https://www.powershellgallery.com/
      so we can install it using a command line instead of manual download 
      
      thanks!