Provider cmdlets
The cmdlets that the user can run to manage a data store are referred to as provider cmdlets. To support these cmdlets, you need to overwrite some of the methods defined by the base provider classes and interfaces.
Here are the provider cmdlets that can be run by the user:
Get-PSDrive: This cmdlet returns the Windows PowerShell drives in the current session. You do not need to overwrite any methods to support this cmdlet.
New-PSDrive: This cmdlet allows the user to create Windows PowerShell drives to access the data store. To support this cmdlet, overwrite the DriveCmdletProvider::NewDrive and DriveCmdletProvider::NewDriveDynamicParameters methods.
Remove-PSDrive: This cmdlet allows the user to remove Windows PowerShell drives that access the data store. To support this cmdlet, overwrite the DriveCmdletProvider::RemoveDrive method.
Clear-Item: This cmdlet allows the user to remove the value of an item in the data store. To support this cmdlet, overwrite the ItemCmdletProvider::ClearItem and ItemCmdletProvider::ClearItemDynamicParameters methods.
Copy-Item: This cmdlet allows the user to copy an item from one location to another. To support this cmdlet, overwrite the ContainerCmdletProvider::CopyItem and ContainerCmdletProvider::CopyItemDynamicParameters methods.
Get-Item: This cmdlet allows the user to retrieve data from the data store. To support this cmdlet, overwrite the ItemCmdletProvider::GetItem and ItemCmdletProvider::GetItemDynamicParameters methods.
Get-ChildItem: This cmdlet allows the user to retrieve the child items of the parent item. To support this cmdlet, overwrite the following methods:
Invoke-Item: This cmdlet allows the user to perform the default action specified by the item. To support this cmdlet, overwrite the ItemCmdletProvider::InvokeDefaultAction and ItemCmdletProvider::InvokeDefaultAction methods.
Move-Item: This cmdlet allows the user to move an item from one location to another location. To support this cmdlet, overwrite the NavigationCmdletProvider::MoveItem and NavigationCmdletProvider::MoveItemDynamicParameterss methods.
New-ItemProperty: This cmdlet allows the user to create a new item in the data store.
Remove-Item: This cmdlet allows the user to remove items from the data store. To support this cmdlet, overwrite the ContainerCmdletProvider::RemoveItem and ContainerCmdletProvider::RemoveItemDynamicParameters methods.
Rename-Item: This cmdlet allows the user to rename items in the data store. To support this cmdlet, overwrite the ContainerCmdletProvider::RenameItem and ContainerCmdletProvider::RenameItemDynamicParameters methods.
Set-Item: This cmdlet allows the user to update the values of items in the data store. To support this cmdlet, overwrite the M:System.Management.Automation.Provider.ItemCmdletProvider.SetItem(System.String) and M:System.Management.Automation.Provider.ItemCmdletProvider.SetItemDynamicParameters(System.String) methods.
Add-Content: This cmdlet allows the user to add content to an item.
Clear-Content: This cmdlet allows the user to delete content from an item without deleting the item. To support this cmdlet, overwrite the IContentCmdletProvider::ClearContent and IContentCmdletProvider::ClearContentDynamicParameters methods.
Get-Content: This cmdlet allows the user to retrieve the content of an item. To support this cmdlet, overwrite the IContentCmdletProvider::GetContentReader and IContentCmdletProvider::GetContentReaderDynamicParameters methods. The GetContentReader method returns an IContentReader interface that defines the methods used to read the content.
Set-Content: This cmdlet allows the user to update the content of an item. To support this cmdlet, overwrite the IContentCmdletProvider::GetContentWriter and IContentCmdletProvider::GetContentWriterDynamicParameters methods. The GetContentWriter method returns an IContentWriter interface that defines the methods used to write the content.
Clear-ItemProperty: This cmdlet allows the user to delete the value of a property. To support this cmdlet, overwrite the IPropertyCmdletProvider::ClearProperty and IPropertyCmdletProvider::ClearPropertyDynamicParameters methods.
Copy-ItemProperty: This cmdlet allows the user to copy a property and its value from one location to another. To support this cmdlet, overwrite the IDynamicPropertyCmdletProvider::CopyProperty and IDynamicPropertyCmdletProvider::CopyPropertyDynamicParameters methods.
Get-ItemProperty: This cmdlet retrieves the properties of an item. To support this cmdlet, overwrite the IPropertyCmdletProvider::GetProperty and IPropertyCmdletProvider::GetPropertyDynamicParameters methods.
Move-ItemProperty: This cmdlet allows the user to move a property and its value from one location to another. To support this cmdlet, overwrite the IDynamicPropertyCmdletProvider::MoveProperty and IDynamicPropertyCmdletProvider::MovePropertyDynamicParameters methods.
New-ItemProperty: This cmdlet allows the user to create a new property and set its value. To support this cmdlet, overwrite the IDynamicPropertyCmdletProvider::NewProperty and IDynamicPropertyCmdletProvider::NewPropertyDynamicParameters methods.
Remove-ItemProperty: This cmdlet allows the user to delete a property and its value. To support this cmdlet, overwrite the IDynamicPropertyCmdletProvider::RemoveProperty and IDynamicPropertyCmdletProvider::RemovePropertyDynamicParameters methods.
Rename-ItemProperty: This cmdlet allows the user to change the name of a property. To support this cmdlet, overwrite the IDynamicPropertyCmdletProvider::RenameProperty and IDynamicPropertyCmdletProvider::RenamePropertyDynamicParameters methods.
Set-ItemProperty: This cmdlet allows the user to update the properties of an item. To support this cmdlet, overwrite the IPropertyCmdletProvider::SetProperty and IPropertyCmdletProvider::SetPropertyDynamicParameters methods.
Get-Location: Retrieves information about the current working location. You do not need to overwrite any methods to support this cmdlet.
Pop-Location: This cmdlet changes the current location to the location most recently pushed onto the stack. You do not need to overwrite any methods to support this cmdlet.
Push-Location: This cmdlet adds the current location to the top of a list of locations (a "stack"). You do not need to overwrite any methods to support this cmdlet.
Set-Location: This cmdlet sets the current working location to a specified location. You do not need to overwrite any methods to support this cmdlet.
Join-Path: This cmdlet allows the user to combine a parent and child path segment to create a provider-internal path. To support this cmdlet, overwrite the NavigationCmdletProvider::MakePath method.
Convert-Path: This cmdlet converts a path from a Windows PowerShell path to a Windows PowerShell provider path.
Split-Path: Returns the specified part of a path.
Resolve-Path: Resolves the wildcard characters in a path, and displays the path contents.
Test-Path: This cmdlet determines whether all elements of a path exist. To support this cmdlet, overwrite the ItemCmdletProvider::ItemExists and ItemCmdletProvider::ItemExistsDynamicParameters methods.
Get-PSProvider: This cmdlet returns information about the providers available in the session. You do not need to overwrite any methods to support this cmdlet.