IDynamicPropertyCmdletProvider.NewProperty(String, String, String, Object) IDynamicPropertyCmdletProvider.NewProperty(String, String, String, Object) IDynamicPropertyCmdletProvider.NewProperty(String, String, String, Object) Method

Definition

Creates a new property on the specified item.

public void NewProperty (string path, string propertyName, string propertyTypeName, object value);
abstract member NewProperty : string * string * string * obj -> unit
Public Sub NewProperty (path As String, propertyName As String, propertyTypeName As String, value As Object)
Parameters
path
String String String

The path to the item on which the new property should be created.

propertyName
String String String

The name of the property that should be created.

propertyTypeName
String String String

The type of the property that should be created.

value
Object Object Object

The new value of the property that should be created.

Remarks

Providers override this method to give the user the ability to add properties to provider objects using the new-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 create new 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.

Applies to