Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » New-PSDrive

New-PSDrive - Powershell 2.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 »

New-PSDrive

Short description
Creates a Windows PowerShell drive in the current session.

Syntax


Description
The New-PSDrive cmdlet creates a Windows PowerShell drive that is "mapped" to or associated with a location in a da
ta store, such as a network drive, a directory on the local computer, or a registry key.

You can use the Windows PowerShell drives that you create to access data in the associated data store, just like yo
u would do with any mapped drive. You can change locations into the drive (using "set-location", "cd", or "chdir") 
and access the contents of the drive (using "get-item", "get-childitem", or "dir").

However, the Windows PowerShell drives are known only to Windows PowerShell. You cannot access them by using Window
s Explorer, Windows Management Instrumentation (WMI), Component Object Model (COM), or the Microsoft .NET Framework
, or by using tools such as Net Use.

 Windows PowerShell drives exist only in the current Windows PowerShell session. To make the drive persistent, you 
can export the session to which you have added the drive, or you can save a New-PSDrive command in your Windows Pow
erShell profile.

To delete a drive that was created by New-PSDrive, use the Remove-PSDrive cmdlet.