DriveCmdletProvider.RemoveDrive
Method
Definition
Gives the provider an opportunity to clean up any provider specific data for the drive that is going to be removed.
protected virtual System.Management.Automation.PSDriveInfo RemoveDrive (System.Management.Automation.PSDriveInfo drive);
Parameters
- drive
- PSDriveInfo
The Drive object the represents the mounted drive.
Returns
If the drive can be removed it should return the drive that was passed in. If the drive cannot be removed, null should be returned or an exception should be thrown.
The default implementation returns the drive that was passed.
Remarks
A provider should override this method to free any resources that may be associated with the drive being removed.