---
title: "Comment by Andrew Johnson on \"Fixing Windows clients Intune automatic enrollment issues using PowerShell\" | Hashnode"
description: "Hello, this script seems to be exactly what I&#39;m looking for. I am having issues with the Invoke-InTuneReenrollment portion. That&#39;s the only part that I"
url: "https://hashnode.com/posts/fixing-windows-clients-intune-automatic-enrollment-issues-using-powershell/616727fc53401f641ba15941/comment/628dc59ebc26026fa45c5cdf"
---

[Discussion](https://hashnode.com/posts/fixing-windows-clients-intune-automatic-enrollment-issues-using-powershell/616727fc53401f641ba15941)

Comment [Fixing Windows clients Intune automatic enrollment issues using PowerShell](https://hashnode.com/posts/fixing-windows-clients-intune-automatic-enrollment-issues-using-powershell/616727fc53401f641ba15941)

[Andrew Johnson](https://hashnode.com/@Chidrewskee27)

[May 25, 2022](https://hashnode.com/posts/fixing-windows-clients-intune-automatic-enrollment-issues-using-powershell/616727fc53401f641ba15941/comment/628dc59ebc26026fa45c5cdf)

Hello, this script seems to be exactly what I'm looking for. I am having issues with the Invoke-InTuneReenrollment portion. That's the only part that I need for what I'm working on. What modules do I need for this part only?

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[May 25, 2022](https://hashnode.com/posts/fixing-windows-clients-intune-automatic-enrollment-issues-using-powershell/616727fc53401f641ba15941/comment/628dc59ebc26026fa45c5cdf#reply-628dc9cbbc26026fa45c5d67)

Not sure what you are asking? Anyway internally Invoke-InTuneReenrollment uses function Invoke-AsSystem which is defined in Reset-HybridADJoin function.

If this is not the case, send me the screenshot with the error you are facing.

[Andrew Johnson](https://hashnode.com/@Chidrewskee27)

[May 25, 2022](https://hashnode.com/posts/fixing-windows-clients-intune-automatic-enrollment-issues-using-powershell/616727fc53401f641ba15941/comment/628dc59ebc26026fa45c5cdf#reply-628dcf1ab4bd016fc9a33323)

I meant that when I try to run just the Invoke-MDMReenrollment ps1, it does nothing. No error message. Just nothing. Do I need any certain Powershell modules installed?

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Jun 23, 2022](https://hashnode.com/posts/fixing-windows-clients-intune-automatic-enrollment-issues-using-powershell/616727fc53401f641ba15941/comment/628dc59ebc26026fa45c5cdf#reply-62b4bdb8b86f939ac81b121c)

[Andrew Johnson](https://hashnode.com/@Chidrewskee27) You have to dot source the ps1 script file and then call a function that it defines, which is Invoke-MDMReenrollment.
