New-PSDrive
Additional Resources for New-PSDrive |
Creating a New
http://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/new-psdrive.mspx
|
SYNOPSIS
Installs a new WIndows PowerShell drive.
SYNTAX
New-PSDrive [-name] <string> [-psProvider] <string> [-root] <string> [-description <string>] [-scope <string>] [-credential <PSCredential>] [-whatIf] [-confirm] [<CommonParameters>]
DETAILED DESCRIPTION
The new-drive cmdlet installs a new drive at the specified location and within the specified parameters.
PARAMETERS
-name <string>
The name of the drive being added.
Required? |
true |
Position? |
1 |
Default value |
N/A - A name must be specified |
Accept pipeline input? |
true (ByPropertyName) |
Accept wildcard characters? |
false |
-psProvider <string>
The name of the specific provider.
Required? |
true |
Position? |
2 |
Default value |
N/A - A provider must be specified |
Accept pipeline input? |
true (ByPropertyName) |
Accept wildcard characters? |
false |
-root <string>
The provider internal root or path for the drive being added.
Required? |
true |
Position? |
3 |
Default value |
N/A - A root must be specified |
Accept pipeline input? |
true (ByPropertyName) |
Accept wildcard characters? |
false |
-description <string>
A short description of the drive.
Required? |
false |
Position? |
named |
Default value |
|
Accept pipeline input? |
true (ByPropertyName) |
Accept wildcard characters? |
false |
-scope <string>
Accepts an index used to identify the scope where the drive will be installed.
Required? |
false |
Position? |
named |
Default value |
local |
Accept pipeline input? |
true (ByPropertyName) |
Accept wildcard characters? |
false |
-credential <PSCredential>
The credential is used to validate access. If a PSCredential object, obtained earlier using get-credential is supplied, it will be used as is. If a user name is supplied, there will be a prompt for a password.
Required? |
false |
Position? |
named |
Default value |
null |
Accept pipeline input? |
true (ByPropertyName) |
Accept wildcard characters? |
false |
-whatIf
Describes what would happen if you executed the command without actually executing the command.
Required? |
false |
Position? |
named |
Default value |
|
Accept pipeline input? |
false |
Accept wildcard characters? |
false |
-confirm
Prompts you for confirmation before executing the command.
Required? |
false |
Position? |
named |
Default value |
|
Accept pipeline input? |
false |
Accept wildcard characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, type, "get-help about_commonparameters".
INPUT TYPE
String
RETURN TYPE
DriveInfo Object
EXAMPLE 1
new-Psdrive -name SmpDrive -Psprovider FileSystem -root C:\SmpPlace
This example installs the SmpDrive on the file system provider. The drive will be assigned the name SmpDrive. The drive will be rooted at "C:\SmpPlace"
Name Provider Root CurrentLocation
---- -------- ---- ---------------
SmpDrive FileSystem C:\SmpPlace
RELATED LINKS