Provider Samples

 

This section includes samples of providers that access a Microsoft Access database. These samples include provider classes that derive from all the base provider classes.

In This Section

This section includes the following topics:

AccessDBProviderSample01 Sample

This sample shows how to declare the provider class that derives directly from the CmdletProvider class. It is included here only for completeness.

AccessDBProviderSample02

This sample shows how to overwrite the NewDrive and RemoveDrive methods to support calls to the New-PSDrive and Remove-PSDrive cmdlets. The provider class in this sample derives from the DriveCmdletProvider class.

AccessDBProviderSample03

This sample shows how to overwrite the GetItem and SetItem methods to support calls to the Get-Item and Set-Item cmdlets. The provider class in this sample derives from the ItemCmdletProvider class.

AccessDBProviderSample04

This sample shows how to overwrite container methods to support calls to the Copy-Item, Get-ChildItem, New-Item, and Remove-Item cmdlets. These methods should be implemented when the data store contains items that are containers. A container is a group of child items under a common parent item. The provider class in this sample derives from the ContainerCmdletProvider class.

AccessDBProviderSample05

This sample shows how to overwrite container methods to support calls to the Move-Item and Join-Path cmdlets. These methods should be implemented when the user needs to move items within a container and if the data store contains nested containers. The provider class in this sample derives from the NavigationCmdletProvider class.

AccessDBProviderSample06

This sample shows how to overwrite content methods to support calls to the Clear-Content, Get-Content, and Set-Content cmdlets. These methods should be implemented when the user needs to manage the content of the items in the data store. The provider class in this sample derives from the NavigationCmdletProvider class, and it implements the IContentCmdletProvider interface.

Show: