I'm writing a NavigationCmdletProvider for PowerShell. Through the GetItem and GetChildItems overrides, there are various types of objects that are written to the pipeline.
The docs for IPropertyCmdletProvider interface tell us the following:
Developers should implement this interface under the following conditions:
- When users must use cmdlets such as the Get-Property and Set-Property cmdlets.
- For a providers that derive from the ItemCmdletProvider, ContainerCmdletProvider, or NavigationCmdletProvider classes.
Confusion:
Not a lot of useful information in my opinion because how would a user know if they must use the Get-Property and Set-Property cmdlet's? I would imagine that's up to the Cmdlet author. The big confusion (for me at least) is if the Cmdlet writes the objects to the pipeline; and those objects have properties exposed that are callable (i.e. get/set); what benefits does calling Get-Property/Set-Property have over manipulating the object(s) directly?
Question:
Under what circumstances should the IPropertyCmdletProvider interface be implemented?
I know I'm missing something here! Any insight would be greatly appreciated.