Assembly: System.Management.Automation (in System.Management.Automation.dll)
'Declaration Protected Overridable Function InitializeDefaultDrives As Collection(Of PSDriveInfo)
Return ValueA collection of PSDriveInfo objects for each drive the provider wants to mount. If no drives should be mounted, an empty collection should be returned.
When the provider engine starts a provider, the InitializeDefaultDrives method is called. This is an opportunity for the provider to mount drives that are important to it. For instance, the Active Directory provider might mount a drive for the defaultNamingContext if the computer is part of a domain.
All providers should mount a root drive to increase discoverability. This root drive might contain a listing of a set of locations that would be interesting as roots for other mounted drives. For example, the Active Directory provider might create a drive that lists the naming contexts found in the namingContext attributes on the RootDSE. This will help users discover interesting mount points for other drives.
This method defines provider-specific functionality for the New-Drive cmdlet. If this implementation of the cmdlet requires addition parameters, the provider must also call the NewDriveDynamicParameters method.
For more information about providers, see Windows PowerShell Providers.
Target PlatformsWindows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional, Windows Vista, Windows Server 2003 R2, Windows XP, Windows 7, Windows 2008 R2, Windows Developer Preview, Windows Server Developer Preview
Send comments about this topic to Microsoft.