DLL Pickle¶
A PowerShell module that helps you get un-stuck from dependency version conflicts (aka DLL pickle) that often occur when trying to connect to multiple Microsoft services.

Description¶
Numerous PowerShell modules include a dependency on the Microsoft Authentication Library (MSAL) for authenticating to Microsoft’s online services. The latest version of the MSAL (4.79.1) is actively maintained in AzureAD/microsoft-authentication-library-for-dotnet. However, modules that depend on the MSAL libraries (such as Microsoft.Identity.Client.dll) all update their releases with different versions of MSAL on different schedules. This results in version conflicts that break authentication flows whenever you try to use multiple modules in one session. Examples of modules that can be affected by this include:
- Az.Accounts
- ExchangeOnlineManagement
- Microsoft.Graph.Authentication
- MicrosoftTeams
- MSAL.PS
- Maester
…and many more.
You can manually attempt to work around this by checking which version of the conflicting DLLs are used by each of your PowerShell modules and then connect first to whichever service module uses the newest version of the DLL.
This works because of the “first one wins” rule and because the MSAL is designed to be backwards compatible.
DLL Pickle handles this for you by automatically releasing a new version of DLL Pickle whenever a new release of the MSAL is found. As long as you keep the DLL Pickle module up to date and load it first in your PowerShell profile (or manually load it first in your session), then all other PowerShell modules should be able to use this new MSAL that is loaded by DLL Pickle.
For more information about how this works, read here.
Getting Started¶
Prerequisites¶
PowerShell 7.4 or later on Linux, macOS, or Windows for the automated preload
(Import-DPLibrary). The inspection helpers — for diagnosing conflicts and
guiding a manual fix, including across Windows PowerShell 5.1 module installs —
are cross-edition. See the Deep Dive and
Architecture for the full platform-support contract.
Installation¶
Or, if you use traditional PowerShellGet:
Using DLL Pickle¶
The easiest way to benefit from DLL Pickle is to import the module in your PowerShell profile before any other module or assembly is loaded. Just add the line Import-Module DLLPickle to your profile, save it, and start a new instance of PowerShell.
Alternatively, if you are starting work in a new PowerShell session in which you know you will be authenticating to multiple online services, run this at the beginning of your session:
Additional command reference: