Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue pulling Autopilot Config #55

Open
M0VENTURA opened this issue Jun 29, 2023 · 3 comments
Open

Issue pulling Autopilot Config #55

M0VENTURA opened this issue Jun 29, 2023 · 3 comments

Comments

@M0VENTURA
Copy link

Hi, Getting the following error after connecting to our Azure environment

Grabbing Autopilot config file from Azure..
Write-Error: System.Management.Automation.CommandNotFoundException: The term 'Invoke-MgGraphRequest' 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 System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

I've made sure that all required modules are installed. Apparently Microsoft has made some changes lately, not sure if that's caused it to break, or if theres something simple I'm missing.

@steyrs
Copy link

steyrs commented Jul 5, 2023

Hi Ben!
Thank you for this awesome tool :)
..
Any chance you have time to upgrade the tool to handle the changes Microsoft made in order to access Microsoft Graph?
(the tool fails when it tries to grab the autopilot configuration file - and to the best of my knowledge - it all boils down to failure to access Microsoft Graph due to a whole bunch of changes made recently by Microsoft)

...

I have the same experience as @M0VENTURA

Tried following Microsofts advice on how to get the autopilot configuration profile - but to avail.
Their documentation regarding this matter is outdated.

I ended up on Reddit -

  • and found a solution. (see the user Endpointers - post)

::::::::::::::::::::::::::::
This is how it's supposed to be done using the SDK:

Import-Module Microsoft.Graph.DeviceManagement.Enrolment

Select-MgProfile beta

Connect-MgGraph -scopes 'DeviceManagementServiceConfig.Read.All'

Get-MgDeviceManagementWindowAutopilotDeploymentProfile

Typos and all. :)
::::::::::::::::::::

If my coding skills were adequate I would do it myself - but unfortunately we are not there yet.

Thanks in advance - and thank you for any update regarding this matter

@rheibel
Copy link

rheibel commented Jan 18, 2024

Excellent tool but the same issue needs updating to cope with the Microsoft changes luckily I already made several USB's and its fairly simple to manually copy over the install.wim to the correct location but would really appreciate a fix for admins just finding this tool.

@tabs-not-spaces
Copy link
Owner

tabs-not-spaces commented Jan 18, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants