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
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
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:
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:
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
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.
Most helpful comment
Hi
Connect-MSGraph should be used instead.