concept psdrive in category powershell

appears as: PSDrives, PSDrive
Windows PowerShell in Action, Third Edition

This is an excerpt from Manning's book Windows PowerShell in Action, Third Edition.

Figure 16.1. The default PowerShell providers and PSDrives

Non-PowerShell applications don’t understand PSDrives and therefore can’t use paths containing PSDrives directly. If you’re in the PSDrive, the system auto-matically sets the current directory properly on the child process object to the provider-specific path before starting the process. You need to use the provider-specific path as supplied by Resolve-Path:

PowerShell in Depth, Second Edition

This is an excerpt from Manning's book PowerShell in Depth, Second Edition.

  • Some commands default to a credential other than the one you opened the shell with. For example, the Active Directory module (included in Windows Server 2008 R2 and later) lets you map PSDrives to Active Directory domains, and you can specify a credential when doing so. When you change to an Active Directory “drive,” any Active Directory commands will inherit the credential used to map the drive. This only works for accessing the drive, not if you use the cmdlets against a remote domain. This is meant to be a convenient way of having multiple authenticated connections opened at the same time, without the need to manage credential objects or constantly retype passwords.
  • In and of themselves, providers aren’t useful, because you can’t use them directly. Instead, they’re used to create PSDrives.

    PSDrives don’t have drive letters; instead, they have drive names. That’s because 26 letters wouldn’t be enough to handle all the drives PowerShell might have connected at any one time, and because names are a bit easier to remember than single letters.

    By default, PowerShell maps a number of PSDrives, using some of its built-in adapters, every time it starts. When a module or snap-in includes a provider, it’ll usually map a PSDrive or two when the module or snap-in loads. To see a list of all currently available PSDrives, run Get-PSDrive: