Skip to content

Providers and the PowerShell “Drive” Model

PowerShell exposes many system components as providers, which present different data stores through a unified interface. Each provider appears as a drive, similar to a filesystem drive, allowing navigation with the same commands used for directories. This model allows administrators to work with the registry, certificates, environment variables, and other stores using the same commands they use for files.


Providers and Their Purpose

A provider is a PowerShell component that exposes a data store as a hierarchical structure. Each provider defines how to read, write, and navigate its data. Common providers include:

  • FileSystem: Exposes files and directories.
  • Registry: Exposes registry hives such as HKLM: and HKCU:.
  • Certificate: Exposes certificate stores.
  • Environment: Exposes environment variables.
  • Function, Alias, Variable: Expose internal PowerShell constructs.

Each provider appears as a drive with a name ending in a colon, such as C:, HKLM:, or Cert:.


The PowerShell Drive Model

PowerShell treats each provider as a drive that can be navigated with standard commands. This creates a consistent experience across different data sources.

Examples of drives:

  • C: — filesystem
  • HKLM: — registry (HKEY_LOCAL_MACHINE)
  • HKCU: — registry (HKEY_CURRENT_USER)
  • Cert: — certificate store
  • Env: — environment variables

Because all providers follow the same navigation model, the same commands work everywhere.


PowerShell uses familiar navigation commands that behave consistently across all providers:

  • cd or Set-Location — change location
  • ls or Get-ChildItem — list items
  • pwd or Get-Location — show current location

Examples:

cd HKLM:\Software
ls
cd Cert:\LocalMachine\My
ls
cd Env:
ls

These commands work because each provider exposes its data as a structured hierarchy.


Practice Commands

Try running these commands in your PowerShell terminal:

Get-PSDrive
cd HKCU:\Software
ls
cd Cert:\CurrentUser
ls
cd Env:
ls