PropertyCmdletProviderIntrinsics.New PropertyCmdletProviderIntrinsics.New PropertyCmdletProviderIntrinsics.New Method

Definition

Overloads

New(String, String, String, Object) New(String, String, String, Object) New(String, String, String, Object)

Creates a new property on the specified item

New(String[], String, String, Object, Boolean, Boolean) New(String[], String, String, Object, Boolean, Boolean) New(String[], String, String, Object, Boolean, Boolean)

Creates a new property on the specified item

New(String, String, String, Object) New(String, String, String, Object) New(String, String, String, Object)

Creates a new property on the specified item

public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> New (string path, string propertyName, string propertyTypeName, object value);
member this.New : string * string * string * obj -> System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject>
Public Function New (path As String, propertyName As String, propertyTypeName As String, value As Object) As Collection(Of PSObject)
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.

Returns

A PSObject for each item that the property was created on. The PSObject contains the properties that were created.

Exceptions

If the path refers to a provider that could not be found.

If the path refers to a drive that could not be found.

If path does not contain glob characters and could not be found.

If the provider that the path refers to does not support this operation.

New(String[], String, String, Object, Boolean, Boolean) New(String[], String, String, Object, Boolean, Boolean) New(String[], String, String, Object, Boolean, Boolean)

Creates a new property on the specified item

public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> New (string[] path, string propertyName, string propertyTypeName, object value, bool force, bool literalPath);
member this.New : string[] * string * string * obj * bool * bool -> System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject>
Public Function New (path As String(), propertyName As String, propertyTypeName As String, value As Object, force As Boolean, literalPath As Boolean) As Collection(Of PSObject)
Parameters
path
String[]

The path(s) to the item(s0 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.

force
Boolean Boolean Boolean

Passed on to providers to force operations.

literalPath
Boolean Boolean Boolean

If true, globbing is not done on paths.

Returns

A PSObject for each item that the property was created on. The PSObject contains the properties that were created.

Exceptions

If the path refers to a provider that could not be found.

If the path refers to a drive that could not be found.

If path does not contain glob characters and could not be found.

If the provider that the path refers to does not support this operation.

Applies to