PowerShell Providers (or PSProviders) are built-in .NET components that present different data stores, such as the file system, the Windows Registry, environment variables, digital certificates, and even session memory, through a single, unified interface. Each data store is exposed as a navigable drive (a PSDrive), letting you use familiar commands like Get-ChildItem, Set-Location, Get-Item, and New-Item on virtually anything.
This design is a direct extension of PowerShell's object-based philosophy: rather than exposing the registry through a separate GUI tool and environment variables through yet another mechanism, everything becomes a drive you can cd into and list with Get-ChildItem.
What Are PS Providers?
A PS Provider is a .NET component that makes a specific data store accessible using the same cmdlets you'd use to browse the file system. Instead of learning a separate tool for the registry or environment variables, you navigate them exactly like folders.
| Provider | Drive | Exposes |
|---|---|---|
FileSystem |
C:\, D:\, etc. |
Files and folders, network shares |
Registry |
HKLM:\, HKCU:\ |
Windows Registry keys and values |
Environment |
Env:\ |
Environment variables |
Certificate |
Cert:\ |
Installed certificates and certificate stores |
Function |
Function:\ |
Currently loaded functions in the session |
Variable |
Variable:\ |
Currently defined variables in the session |
Alias |
Alias:\ |
Currently defined aliases in the session |
Get-PSProvider
Get-PSProvider lists all providers currently registered in the session.
Get-PSProviderName Capabilities Drives
---- ------------ ------
Registry ShouldProcess, Transactions {HKLM, HKCU}
Alias ShouldProcess {Alias}
Environment ShouldProcess {Env}
FileSystem Filter, ShouldProcess, Credentials {C, A, D}
Function ShouldProcess {Function}
Variable ShouldProcess {Variable}
Certificate ShouldProcess {Cert}where:
Nameidentifies the provider.Capabilitiesshows supported operations, such asShouldProcess(supports-WhatIf/-Confirm).Driveslists which drive letters/names are currently mapped to that provider.
Get-PSDrive
Get-PSDrive lists all drives currently mounted in the session, including both traditional file system drives and provider-based drives. While traditional operating system drives are identified by single letters (C:, D:), PSDrives can use descriptive names (Env:, Cert:, HKLM:).
Get-PSDriveName Used (GB) Free (GB) Provider Root
---- --------- --------- -------- ----
Alias Alias
C 353.49 123.45 FileSystem C:\
Cert Certificate \
Env Environment
Function Function
HKCU Registry HKEY_CURRENT_USER
HKLM Registry HKEY_LOCAL_MACHINE
Variable Variablewhere:
Nameis the drive identifier used withcdorSet-Location(e.g.,HKLM:).Providershows which PS Provider backs that drive.Rootshows the underlying data source the drive maps to.
Navigating Non-Filesystem Drives
Because registry keys, environment variables, certificates, and other provider data are exposed as drives, you can navigate them using the exact same commands used for folders: Set-Location (aliased cd) and Get-ChildItem (aliased ls/dir).
Navigating the Registry
The Registry provider exposes registry hives as directory structures:
cd HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion
Get-ChildItem | Select-Object -First 3 Hive: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
Name Property
---- --------
AccountPicture
ActionCenter
App ManagementTo read registry values (which are stored as properties on the registry key rather than separate items), use Get-ItemProperty:
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name "ProductName"ProductName : Windows 10 Pro
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT
PSChildName : CurrentVersion
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\RegistryNavigating Environment Variables
The Env: PSDrive exposes process environment variables as virtual files:
cd Env:\
Get-ChildItem | Select-Object -First 3Name Value
---- -----
ALLUSERSPROFILE C:\ProgramData
APPDATA C:\Users\Tom\AppData\Roaming
ChocolateyInstall C:\ProgramData\chocolateyAccessing a specific environment variable works the same way as accessing a file:
Get-Content Env:\COMPUTERNAMEWEB01Navigating the Certificate Store
On Windows, the Cert: drive lets you inspect SSL/TLS certificates and root authorities:
Get-ChildItem -Path "Cert:\LocalMachine\Root" | Select-Object -First 2 -Property Thumbprint, SubjectThumbprint Subject
---------- -------
CDD4EEAE6000AC7F40C3802C171E30148030C072 CN=Microsoft Root Certificate Authority, ...
A4348F58344A70D14E359E798771A9B923141C52 CN=Microsoft Root Authority, OU=Microso...Creating Custom PSDrives
New-PSDrive lets you create your own shortcuts to frequently accessed locations, whether a deep folder path, a network share, or a specific registry key. This is useful for creating short path shortcuts to deep folder structures, remote network shares, or complex registry paths.
Syntax
New-PSDrive -Name <String> -PSProvider <String> -Root <String> [-Description <String>]Mounting a Shortcut to a Deep Folder
New-PSDrive -Name "Logs" -PSProvider FileSystem -Root "C:\Data\Application\Logs"where:
-Name "Logs"defines the new drive name, accessible asLogs:.-PSProvider FileSystemspecifies which provider backs the new drive.-Rootspecifies the actual target path the drive maps to.
cd Logs:\
Get-ChildItem Directory: C:\Data\Application\Logs
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 3/14/2026 8:30 AM 10240 app.log
-a--- 3/13/2026 6:15 PM 8192 error.logMounting a Shortcut to a Deep Registry Path
New-PSDrive -Name "WinUninstall" -PSProvider "Registry" -Root "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"Name Used (GB) Free (GB) Provider Root
---- --------- --------- -------- ----
WinUninstall Registry HKEY_LOCAL_MACHINE\SOFTWARE\M...Once mounted, you can navigate and query it directly using its shortcut name:
Set-Location WinUninstall:\
Get-ChildItem | Select-Object -First 2Removing a Custom PSDrive
When a virtual drive is no longer needed, unmount it using Remove-PSDrive:
Set-Location C:\
Remove-PSDrive -Name "WinUninstall"Practical Example: Auditing Installed Software via a Custom PSDrive
The following script creates a temporary PSDrive pointing to the Windows Uninstall registry hive, queries installed software packages, extracts their versions and publishers, and cleans up the PSDrive afterward:
$DriveName = "AppRegistry"
$TargetHive = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
$null = New-PSDrive -Name $DriveName -PSProvider Registry -Root $TargetHive
try {
$Apps = Get-ChildItem -Path "$($DriveName):\" | ForEach-Object {
$props = Get-ItemProperty -Path $_.PSPath
if ($props.DisplayName) {
[PSCustomObject]@{
ApplicationName = $props.DisplayName
Version = $props.DisplayVersion
Publisher = $props.Publisher
InstallDate = $props.InstallDate
}
}
}
$Apps | Sort-Object ApplicationName | Select-Object -First 3
}
finally {
Set-Location "$env:SystemDrive\"
Remove-PSDrive -Name $DriveName -ErrorAction SilentlyContinue
}where:
New-PSDrive -Name $DriveName -PSProvider Registry -Root $TargetHivecreates a virtual drive pointing directly to the target registry key.Get-ChildItem -Path "$($DriveName):\"lists the registry subkeys using standard drive path syntax.Get-ItemProperty -Path $_.PSPathreads values from each subkey.finally { Remove-PSDrive ... }guarantees the custom drive is unmounted when the script finishes.
Execute the script from the console:
pwsh ./audit-installed-software.ps1ApplicationName Version Publisher InstallDate
--------------- ------- --------- -----------
7-Zip 26.00 (x64) 26.00 Igor Pavlov
Git 2.53.0.2 The Git Development Community 20260328
GPL Ghostscript 10.07.0 Artifex Software Inc.