Provider Paths

Provider paths are used to access items in a data store. When a provider cmdlet is run, the user specifies the path to the item to be accessed. For example, the following command gets the root item of the HKEY_LOCAL_MACHINE hive of the Windows Registry: get-item hklm:.

Types of Paths

Windows PowerShell supports the following types of paths.

Drive-Qualified Paths

A drive-qualified path is a combination of the item name, the container and subcontainers in which the item is located, and the Windows PowerShell drive through which the item is accessed. (Drives are defined by the provider that is used to access the data store. For more information about drives, see Provider Drives.) This path starts with the drive name followed by a colon (:). For example: get-childitem C:

Provider-Qualified Paths

To allow the Windows PowerShell engine to initialize and uninitialize your provider, the provider must support a provider-qualified path. For example, the user can initialize and uninitialize the FileSystem provider because it defines the following provider-qualified path: FileSystem::\\uncshare\abc\bar.

Provider-Direct Paths

To allow remote access to your Windows PowerShell provider, it should support a provider-direct path to pass directly to the Windows PowerShell provider for the current location. For example, the registry Windows PowerShell provider can use \\server\regkeypath as a provider-direct path.

Provider-Internal Paths

To allow the provider cmdlet to access data using non-Windows PowerShell application programming interfaces (APIs), your Windows PowerShell provider should support a provider-internal path. This path is indicated after the "::" in the provider-qualified path. For example, the provider-internal path for the filesystem Windows PowerShell provider is \\uncshare\abc\bar.

See Also

Other Resources

Writing a Windows PowerShell Provider