Windows PowerShell AccessDB Provider Sample 06
This sample shows how to implement a basic Windows PowerShell provider that creates PowerShell drives to manipulate items, navigate containers, and access content.
Windows PowerShell providers enable users to access data in a consistent format that resembles a file system drive.
Sample Objectives
This sample demonstrates the following:
- Creating a basic Windows PowerShell provider.
- Creating Windows PowerShell drives.
- Manipulating items through the provider.
- Manipulating containers of items.
- Providing support for levels of navigation.
- Accessing content.
Related topics
Writing a Windows PowerShell Provider
Managing Windows PowerShell Drives
Operating system requirements
Client
Windows 8.1
Server
Windows Server 2012 R2
Build the sample
-
Start Microsoft Visual Studio and select File > Open > Project/Solution.
-
Go to the directory named for the sample, and double-click the Visual Studio Solution (.sln) file.
-
Press F7 or use Build > Build Solution to build the sample.
The library will be built in the default \bin or \bin\Debug directory.
Run the sample
- Start Windows PowerShell.
- Navigate to the folder containing the sample DLL.
- Run
Import-Module .\AccessDBProviderSample06.dll. This will add the AccessDB provider to the current environment. - Run
Get-PSProviderto see the new AccessDB provider. - Run
Get-PSDriveto see the new PowerShell drive. - Run
Get-ItemandSet-Itemto manipulate items using the provider. - Run
Get-LocationandSet-Locationto navigate using the provider. - Run
Get-ContentandSet-Contentto access content using the provider.