ItemCmdletProvider.SetItem(String, Object) 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.
Sets the item specified by the path.
protected:
virtual void SetItem(System::String ^ path, System::Object ^ value);
protected:
virtual void SetItem(Platform::String ^ path, Platform::Object ^ value);
virtual void SetItem(std::wstring const & path, winrt::Windows::Foundation::IInspectable const & value);
protected virtual void SetItem (string path, object value);
abstract member SetItem : string * obj -> unit
override this.SetItem : string * obj -> unit
Protected Overridable Sub SetItem (path As String, value As Object)
Parameters
- path
- String
The path to the item to set.
- value
- Object
The value of the item specified by the path.
Remarks
Providers override this method to give the user the ability to modify provider objects using the set-item 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 set or write 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.
The default implementation of this method throws an PSNotSupportedException.