Windows PowerShell AccessDB Provider Sample 04
This sample shows how to implement a basic Windows PowerShell provider that creates PowerShell drives to manipulate items with containers.
Subsequent provider samples show how to implement additional provider functionality. 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.
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 .\AccessDBProviderSample04.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.