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.2. Drives

Providers would be useless if there were no way to get items from them. The standard mechanism to provide items is through a drive. Similar to Windows drives, PowerShell drives use an identifier followed by a colon like C: or D:. Unlike Windows drives, PowerShell drives can have longer identifiers like Env:, cert:, and HKCU:. We can get information about the drives currently registered on the system with the Get-PSDrive cmdlet:

PS> Get-PSDrive Name Provider Root CurrentLo cation ---- -------- ---- --------- Alias Alias C FileSystem C:\ cert Certificate \ D FileSystem D:\ E FileSystem E:\ Env Environment F FileSystem F:\ Function Function HKCU Registry HKEY_CURRENT_USER Software HKLM Registry HKEY_LOCAL_MACHINE ...indows Variable ...

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