This tutorial, we will discuss how to fix error, Add-Type : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Recently I was trying to work with PowerShell to connect to SharePoint Online. But I got the error which says: Add-Type : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Basically, we were trying to use Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll in PowerShell as below.
- Add-Type -Path ‘E:\Bijay\Microsoft.SharePoint.Client.dll’
- Add-Type -Path ‘E:\Bijay\Microsoft.SharePoint.Client.Runtime.dll’
But when we run the command, it gave the error like below:
Add-Type : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more
information.
Add-Type : Unable to load one or more of the requested types
The dlls were creating the problem here. So I replace the above dlls with new dlls from the 16 hive folder.
After this, you will not get the error Add-Type : Unable to load one or more of the requested types.
You may like following SharePoint PowerShell tutorials:
- PowerShell SharePoint Online: The remote server returned an error: (403) Forbidden
- Retrieve List Items Created in Last N days using PowerShell SharePoint Online
- Exception calling ExecuteQuery with 0 argument(s): Unable to connect to the remote server error in PowerShell SharePoint Online
- net System error 2240 has occurred The user is not allowed to log on from this workstation error in PowerShell SharePoint Online
- Connect-PnPOnline : The ‘Connect-PnPOnline’ command was found in the module ‘SharePointPnPPowerShellOnline’
- Cannot be loaded because the execution of scripts is disabled on this system while running PowerShell for SharePoint online site
- The remote server returned an error (401) Unauthorized SharePoint Online/2016/2013 CSOM or PowerShell
Hello Everyone!! I am Bhawana a SharePoint MVP and having about 10+ years of SharePoint experience as well as in .Net technologies. I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools. Now exploring more in SharePoint 2016 🙂 Hope here I can contribute and share my knowledge to the fullest. As I believe “There is no wealth like knowledge and no poverty like ignorance”