Skip to content

๐Ÿฅ’ DLL Pickle

A PowerShell module that helps you get un-stuck from dependency version conflicts that can occur when connecting to multiple Microsoft online services.

GitHub top language Codacy Badge PRs Welcome PowerShell Gallery Version OpenSSF Best Practices

A stressed pickle trying to explain the problem in their code to a rubber duck.

๐Ÿง‘โ€๐Ÿ’ป Getting Started

Prerequisites

One of the declared PowerShell lines in the generated support matrix on Linux, macOS, or Windows. The current contract is PowerShell 7.4, 7.5, and 7.6, each with its matching .NET runtime bundle. The matrix distinguishes Microsoft lifecycle support from a bounded hosted-service compatibility holdover.

Installation

Install-Module DLLPickle -Scope CurrentUser

Or, with Microsoft.PowerShell.PSResourceGet:

Install-PSResource -Name DLLPickle -Scope CurrentUser

Using

Import DLL Pickle and run Import-DPLibrary before connecting to other service modules โ€” ideally as the first thing in your PowerShell profile, so it loads first in every session.

Import-DPLibrary

For diagnostic detail, add -ShowLoaderExceptions -Verbose.

Commands

Primary:

  • Import-DPLibrary โ€” preload DLLPickle-managed assemblies in dependency-aware order.
  • Import-DPBaseProfile โ€” preload, then import the validated base-profile modules (Exchange Online, Teams, Graph, Az.Accounts) in a known-good order.
  • Test-DPLibraryConflict โ€” report known-incompatible module pairs loaded in the current session, with the workaround.
  • Get-DPConfig / Set-DPConfig โ€” view or change configuration (for example, show logo, skip libraries).

Inspection helpers:

  • Find-DLLInPSModulePath โ€” find DLLs across module paths, filtered by product metadata.
  • Get-ModuleImportCandidate โ€” show which installed module version would import.
  • Get-ModulesWithDependency โ€” list installed modules that package a given dependency.
  • Get-ModulesWithVersionSortedIdentityClient โ€” compare modules by packaged Microsoft.Identity.Client.dll version.

The inspection helpers are cross-edition. Import-DPLibrary needs a supported PowerShell/.NET profile, but these helpers also scan the Windows PowerShell module roots โ€” so a Windows PowerShell 5.1 user can use a supported PowerShell session to find which module to load first and apply the “first one wins” fix manually.

Full syntax and examples: docs index ยท command reference.

๐Ÿฅ’ How It Works

Many PowerShell modules โ€” Az, Exchange Online, Microsoft Graph, Teams, and more โ€” bundle their own copy of the Microsoft Authentication Library (MSAL) and related DLLs. A single PowerShell session can only load one version of a given DLL, so when two modules ship different versions you hit “an assembly with the same name is already loaded” and authentication breaks.

DLL Pickle preloads a current, compatible set of these assemblies first, so the “first one wins” rule works in your favor and the modules you load afterward reuse what’s already there. Dependency updates are locked, tested across every supported PowerShell/OS profile, and released only after the compatibility gates pass.

The loader selects net8.0, net9.0, or net10.0 from the exact PowerShell minor and CLR major and fails closed on an unknown or mismatched pair.

For the full explanation (and the real-world issues that motivated it), read the Deep Dive.

Compatibility, versioning, and dependency details live in DEPENDENCIES.md.

๐Ÿ“š Documentation Map