Are you getting the error “register-pnpmanagementshellaccess is not recognized” while using PnP PowerShell? I will show you how to fix this error.
Register-PnPManagementShellAccess : The term ‘Register-PnPManagementShellAccess’ is not recognized
Recently, I was using PnP PowerShell to connect to SharePoint Online. While running the below command, I received the error:
Register-PnPManagementShellAccess
The complete error message looks like the below:
Register-PnPManagementShellAccess : The term ‘Register-PnPManagementShellAccess’ 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.
You can see the screenshot below:
Now, let me tell you a few things I debug.
I installed PowerShell’s latest version (PowerShell 7.4.1 or more), but when I ran the $PSVersionTable cmdlet, it still showed me PowerShell version 5. You can see the screenshot below:
Solution: register-pnpmanagementshellaccess not working
Here is what I did to fix this error.
Open the PowerShell 7 command prompt. To do so, click on Start -> All apps and then choose PowerShell 7 (x64) like in the below screenshot.
This will open the PowerShell 7, and you can run the command below.
Register-PnPManagementShellAccess
Now, the error will not come. You can see this in the screenshot below:
I hope this will fix the register-pnpmanagementshellaccess not working issue that you might receive while working with PnP PowerShell. You can follow the steps and let me know if you can fix the error “register-pnpmanagementshellaccess is not recognized“.
You may also like:
- Missing argument in parameter list PowerShell
- the term ‘get-spweb’ is not recognized as the name of a cmdlet
- get-msoluser not recognized
- connect-msolservice not recognized
- Exception calling ExecuteQuery with 0 argument(s): Unable to connect to the remote server error in PowerShell SharePoint Online
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com