Dealing with PSDrive (Simple)

A few changes have been introduced with respect to files and drives in Windows PowerShell Version 3.0. Windows PowerShell has a built-in drive mechanism for things such as registry, certificate, alias, function, variable, and so on. You can treat these drives as filesystems.

Getting ready

There are some functionality changes when we create a new custom PSDrive using PowerShell Version 3.0. Let's walk through them.

New-PSDrive

This CMDLET creates a new temporary or persistent drive with various Windows PowerShell provider types.

How to do it...

  1. You can get the list of default Windows PowerShell providers by executing the following CMDLET:
    PS C :\> Get-PSProvider
    Name         Capabilities                         Drives
    ----         ------------                         ------
    Alias ShouldProcess ...

Get Instant Windows PowerShell Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.