IDynamicPropertyCmdletProvider.RemoveProperty(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes a property on the item specified by the path.
public:
void RemoveProperty(System::String ^ path, System::String ^ propertyName);
public:
void RemoveProperty(Platform::String ^ path, Platform::String ^ propertyName);
void RemoveProperty(std::wstring const & path, std::wstring const & propertyName);
public void RemoveProperty (string path, string propertyName);
abstract member RemoveProperty : string * string -> unit
Public Sub RemoveProperty (path As String, propertyName As String)
Parameters
- path
- String
The path to the item on which the property should be removed.
- propertyName
- String
The name of the property to be removed.
Remarks
Providers override this method to give the user the ability to remove properties from provider objects using the remove-itemproperty cmdlet.
Providers that declare ProviderCapabilities of ExpandWildcards, Filter, Include, or Exclude should ensure that the path passed meets those requirements by accessing the appropriate property from the base class.
By default overrides of this method should not remove properties on objects that are generally hidden from the user unless the Force property is set to true. An error should be sent to the WriteError method if the path represents an item that is hidden from the user and Force is set to false.