Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Get-PSDrive

Get-PSDrive - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Get-PSDrive

Short description
Gets drives in the current session.

Syntax


Description
The Get-PSDrive cmdlet gets the drives in the current session. You can get a particular drive or all drives in the sess
ion.


Get-PSDrive gets the following types of drives:


-- Windows logical drives on the computer, including drives mapped to network shares.


-- Drives exposed by Windows PowerShell providers (such as the Certificate:, Function:, and Alias: drives) and the HKLM
: and HKCU: drives that are exposed by the Windows PowerShell Registry provider.


-- Session-specified temporary drives and persistent mapped network drives that you create by using the New-PSDrivecmdl
et.


Beginning in Windows PowerShell 3.0, the Persist parameter of the New-PSDrive cmdlet can create mapped network drives t
hat are saved on the local computer and are available in other sessions. For more information, see New-PSDrive.


Also, beginning in Windows PowerShell 3.0, when an external drive is connected to the computer, Windows PowerShell auto
matically adds a PSDrive to the file system that represents the new drive. You do not need to restart Windows PowerShel
l. Similarly, when an external drive is disconnected from the computer, Windows PowerShell automatically deletes the PS
Drive that represents the removed drive.