PSDriveInfo
Constructors
Definition
Overloads
| PSDriveInfo(PSDriveInfo) |
Constructs a new instance of the PSDriveInfo using another PSDriveInfo as a template. |
| PSDriveInfo(String, ProviderInfo, String, String, PSCredential) |
Constructs a drive that maps an MSH Path in the shell to a Cmdlet Provider. |
| PSDriveInfo(String, ProviderInfo, String, String, PSCredential, Boolean) |
Constructs a drive that maps an MSH Path in the shell to a Cmdlet Provider. |
| PSDriveInfo(String, ProviderInfo, String, String, PSCredential, String) |
Constructs a drive that maps an MSH Path in the shell to a Cmdlet Provider. |
PSDriveInfo(PSDriveInfo)
Constructs a new instance of the PSDriveInfo using another PSDriveInfo as a template.
protected PSDriveInfo (System.Management.Automation.PSDriveInfo driveInfo);
- driveInfo
- PSDriveInfo
An existing PSDriveInfo object that should be copied to this instance.
If PSDriveInfo is null.
Remarks
A protected constructor that derived classes can call with an instance of this class. This allows for easy creation of derived PSDriveInfo objects which can be created in CmdletProvider's NewDrive method using the PSDriveInfo that is passed in.
PSDriveInfo(String, ProviderInfo, String, String, PSCredential)
Constructs a drive that maps an MSH Path in the shell to a Cmdlet Provider.
public PSDriveInfo (string name, System.Management.Automation.ProviderInfo provider, string root, string description, System.Management.Automation.PSCredential credential);
- name
- String
The name of the drive.
- provider
- ProviderInfo
The name of the provider which implements the functionality for the root path of the drive.
- root
- String
The root path of the drive. For example, the root of a drive in the file system can be c:\windows\system32
- description
- String
The description for the drive.
- credential
- PSCredential
The credentials under which all operations on the drive should occur. If null, the current user credential is used.
PSDriveInfo(String, ProviderInfo, String, String, PSCredential, Boolean)
Constructs a drive that maps an MSH Path in the shell to a Cmdlet Provider.
public PSDriveInfo (string name, System.Management.Automation.ProviderInfo provider, string root, string description, System.Management.Automation.PSCredential credential, bool persist);
- name
- String
The name of the drive.
- provider
- ProviderInfo
The name of the provider which implements the functionality for the root path of the drive.
- root
- String
The root path of the drive. For example, the root of a drive in the file system can be c:\windows\system32
- description
- String
The description for the drive.
- credential
- PSCredential
The credentials under which all operations on the drive should occur. If null, the current user credential is used.
- persist
- Boolean
It indicates if the the created PSDrive would be persisted across PowerShell sessions.
PSDriveInfo(String, ProviderInfo, String, String, PSCredential, String)
Constructs a drive that maps an MSH Path in the shell to a Cmdlet Provider.
public PSDriveInfo (string name, System.Management.Automation.ProviderInfo provider, string root, string description, System.Management.Automation.PSCredential credential, string displayRoot);
- name
- String
The name of the drive.
- provider
- ProviderInfo
The name of the provider which implements the functionality for the root path of the drive.
- root
- String
The root path of the drive. For example, the root of a drive in the file system can be c:\windows\system32
- description
- String
The description for the drive.
- credential
- PSCredential
The credentials under which all operations on the drive should occur. If null, the current user credential is used.
- displayRoot
- String
The network path of the drive. This field would be populted only if PSDriveInfo is targeting the network drive or else this filed is null for local drives.