IContentCmdletProvider Interface
Updated: April 27, 2016
Applies To: Windows PowerShell
Defines the methods used to read or write content for a specific item. Content from an item is read using content readers, and content is written to an item using content writers.
Assembly: System.Management.Automation (in System.Management.Automation.dll)
| Name | Description | |
|---|---|---|
![]() | ClearContent(String) | Clears the content of the specified item. |
![]() | ClearContentDynamicParameters(String) | Retrieves any additional parameters that are required by this implementation of the Clear-Item cmdlet. |
![]() | GetContentReader(String) | Gets a content reader for the specified item. |
![]() | GetContentReaderDynamicParameters(String) | Retrieves any additional parameters required by this implementation of the Get-Content cmdlet. |
![]() | GetContentWriter(String) | Gets a content writer for the specified item. |
![]() | GetContentWriterDynamicParameters(String) | Retrieves any additional parameters that are required by this implementation of the Set-Content cmdlet. |
In this context, an item is something that contains content within a data store. For example, the FileSystem provider (provided by Windows PowerShell) exposes the contents of a file through a content reader and a content writer.
Developers should implement this interface under the following conditions.
When users must use the Get-Content, Set-Content, and Clear-Content cmdlets.
On providers that derive only from the ItemCmdletProvider, ContainerCmdletProvider, or NavigationCmdletProvider classes.
For more information about providers, see Windows PowerShell Providers [ps].
Windows PowerShell provides a TemplateProvider.cs file that is available on the Windows SDK. To start writing your own provider make a copy of this file and use that copy to create your provider, removing any functionality that you do not need. For more information about designing a provider, see Designing Your Windows PowerShell Provider [ps].
