O'Reilly logo

Pro Windows PowerShell by Hristo Deshev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7.1. Enumerating Providers

Let's now take a virtual walk around Providerville. We can get a list of all providers by calling the Get-PSProvider cmdlet:

PS> Get-PSProvider

Name                 Capabilities             Drives
----                 ------------             ------
Alias                ShouldProcess            {Alias}
Environment          ShouldProcess            {Env}
FileSystem           Filter, ShouldProcess    {C, D, E, F}
Function             ShouldProcess            {Function}
Registry             ShouldProcess            {HKLM, HKCU}
Variable             ShouldProcess            {Variable}
Certificate          ShouldProcess            {cert}

As you can see, each of the providers has been used to mount a drive that looks like a regular file system drive. Of those drives, only the ones exposed by the FileSystem provider point to real files. Providers are automatically registered by the snap-ins that contain them, so let's get ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required