You are here:

WindowsManagement.com > PowerShell > PowerShell 1.0 > New-PSDrive
ActiveXperts Network Monitor 2019 proactively manages network servers, devices, databases and more.

New-PSDrive - PowerShell 1.0

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.

New-PSDrive


Description
Back up your Hyper-V VMs Easy & Fast. 100% built for Hyper-V. Free for 2 VMs, forever.

Usage


Options
-name 
       The PowerShell drive name to be added.

   -pSProvider 
       The name of the provider, if omitted you will be prompted.
       e.g. FileSystem, Registry or Certificate. 

   -root string
       The provider internal root or path for the drive being added.

   -description string
       A short description of the drive.

   -scope 
       An index used to identify the scope where the drive will be installed.

   -credential PSCredential
       Use a credential to validate access to the file. Credential represents
       a user-name, such as "User01" or "Domain01\User01", or a PSCredential
       object, such as the one retrieved by using the Get-Credential cmdlet.
       If you type a user name, you will be prompted for a password.

   -whatIf
       Describe what would happen if you executed the command without
       actually executing the command.

   -confirm
       Prompt for confirmation before executing the command.
		
   CommonParameters:

Example(s)
Install a drive called 'SS64' using the file system provider. The drive will be rooted at "C:\MyDocs":

PS C:\>new-Psdrive -name SS64 -psProvider FileSystem -root C:\MyDocs
DIR SS64:

Install a drive called 'S:' using the file system provider. The drive will be rooted at "C:\MyDocs":

PS C:\>new-Psdrive -name S -PsProvider FileSystem -root C:\MyDocs
S:
PS S:\>DIR S:

The parameters are positional, so
PS C:\>New-PSDrive -name M -psprovider FileSystem -root \\Server\Share

is the same as
PS C:\>New-PSDrive M FileSystem \\Server\Share