Windows-itpro-docs: Connect-AutopilotIntune' is not recognized

Created on 15 Nov 2019  Â·  14Comments  Â·  Source: MicrosoftDocs/windows-itpro-docs

In the step 3 of Create the JSON file i am receiving this error, has it changed or something ?

PS C:\WINDOWS\system32> Connect-AutopilotIntune -user [email protected]
Connect-AutopilotIntune : The term 'Connect-AutopilotIntune' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1

  • Connect-AutopilotIntune -user [email protected]
  • ~~~~~~~

    • CategoryInfo : ObjectNotFound: (Connect-AutopilotIntune:String) [], CommandNotFoundException

    • FullyQualifiedErrorId : CommandNotFoundException


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Most helpful comment

Hi

Connect-MSGraph should be used instead.

All 14 comments

Hi

Connect-MSGraph should be used instead.

@officedocsbot assign @jvsam

Hi @mustafafarooq, our apologies for the inconvenience. We would love to help you with your concern, however, this GitHub-based documentation feedback system is intended to help improve the quality of the technical documentation of Microsoft Docs. What we recommend is to open a service/support ticket in your tenant to get immediate assistance. There are also other support resources that you can explore like the Microsoft Tech Community or the Technet forums where you can post your question and get help from the community. You may also want to check this:

The term is not recognized" error when you try to run Azure Active Directory for Windows PowerShell cmdlets

Kindly keep us informed if you find any relevant information that can be incorporated into this documentation.

@CyclopsHelpdesk could you please clarify your comment? Do you mean instead of using Connect-AutopilotIntune, use Connect-MSGraph? Is this a workaround when you get that error? Thanks for the information.

I'm seeing this error also. The error is raised at step 3 of the "Create the JSON file" section .

Using Connect-MSGraph instead does indeed work.

Hi @mustafafarooq, our apologies for the inconvenience. We would love to help you with your concern, however, this GitHub-based documentation feedback system is intended to help improve the quality of the technical documentation of Microsoft Docs. What we recommend is to open a service/support ticket in your tenant to get immediate assistance. There are also other support resources that you can explore like the Microsoft Tech Community or the Technet forums where you can post your question and get help from the community. You may also want to check this:

The term is not recognized" error when you try to run Azure Active Directory for Windows PowerShell cmdlets

Kindly keep us informed if you find any relevant information that can be incorporated into this documentation.

@CyclopsHelpdesk could you please clarify your comment? Do you mean instead of using _Connect-AutopilotIntune_, use _Connect-MSGraph_? Is this a workaround when you get that error? Thanks for the information.

Hi jvsam

Yes, that is correct. The rest of the script works fine - however Connect-AutopilotIntune gives the error. Using Connect-MSGraph (with no arguments) in its place works.

My concern was if the cmdlet doesnt exist as the error indicates, then what is it doing here in the documentation.

Hi, I'm trying to get this working. I've seen that I now have to connect with MSGraph, however when I try to run the following command:

Get-AutopilotProfile | ConvertTo-AutopilotConfigurationJSON

I get the below error:

ConvertTo-AutopilotConfigurationJSON : The term 'Get-Organization' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is c
orrect and try again.
At line:1 char:24

  • Get-AutopilotProfile | ConvertTo-AutopilotConfigurationJSON
  • ~~~~~~~~

    • CategoryInfo : ObjectNotFound: (Get-Organization:String) [ConvertTo-AutoPilotConfigurationJSON], Comman

      dNotFoundException

    • FullyQualifiedErrorId : CommandNotFoundException,ConvertTo-AutoPilotConfigurationJSON

I can't find where that "Get-Organization" command is supposed to come from. What am I missing?

Try making the dir first c:\Autopilot then it should run.

Actually, the problem was that the command ConvertTo-AutopilotConfigurationJSON isn't in the older version of the module. I ended up installing the older version because Install-Module WindowsAutopilotIntune -Force didn't actually install anything. Took forever to find the correct install path for the latest version, but once that was installed everything worked.

Hi @Jamin79, with what you've experienced so far, does it mean the information (specifically the instructions) in the documentation is still accurate? As per the discussion, using Connect-MSGraph instead of Connect-AutopilotIntune works (as confirmed by @CyclopsHelpdesk and @redog). If there is missing information or amendments should be made based on empirical data, please let us know. Thank you.

For Reference: https://oofhours.com/2019/11/02/whats-new-with-the-windowsautopilotintune-powershell-module/

Connect-MSGraph should now be used instead of Connect-AutoPilotIntune

Thank you for that additional information @kennethvs. Let me get this over to the Windows content writing team for review.

(ref. #5772 )

@mustafafarooq

With the help of your feedback, the content has been updated with relevant changes accordingly. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SwiftOnSecurity picture SwiftOnSecurity  Â·  3Comments

weiss-gal picture weiss-gal  Â·  3Comments

helloitsliam picture helloitsliam  Â·  3Comments

KamilSzafarczyk picture KamilSzafarczyk  Â·  3Comments

illfated picture illfated  Â·  3Comments