Printer Friendly Version      Send     
Click to Rate and Give Feedback
PSDriveInfo Class
PSDriveInfo Class
Provides information about a Windows PowerShell drive for a Windows PowerShell provider.


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in system.management.automation.dll)

Visual Basic
Public Class PSDriveInfo
    Implements IComparable
C#
public class PSDriveInfo : IComparable
C++
public ref class PSDriveInfo : IComparable
J#
public class PSDriveInfo implements IComparable
JScript
public class PSDriveInfo implements IComparable

For an example of a Windows PowerShell drive provider that implements this class, see Creating a Windows PowerShell Drive Provider in the Windows PowerShell Programmer's Guide.

A Windows PowerShell provider can derive from this class to provide its own public members or to cache information related to a drive. For instance, if a drive is a connection to a remote machine and making that connection is expensive, the provider might want to keep a handle to the connection as a member of a derived PSDriveInfo class to be used when the provider is invoked.

A Windows PowerShell drive extends the concept of a typical drive in the following ways:

  • A Windows PowerShell drive name can be any alphanumeric sequence.

  • A Windows PowerShell drive can be defined at any valid root or point on a path.

  • A Windows PowerShell drive can be implemented by any Windows PowerShell provider, not just the file system. For example, a drive could be defined on the Active Directory or the Registry.


System.Object
  System.Management.Automation.PSDriveInfo
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP

Target Platforms

Windows Server 2008, Windows Server 2003, Windows Vista, Windows XP
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker