ItemCmdletProviderIntrinsics.New ItemCmdletProviderIntrinsics.New ItemCmdletProviderIntrinsics.New Method

Definition

Overloads

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

Creates a new item at the given path.

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

Creates a new item at the given path.

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

Creates a new item at the given path.

public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> New (string path, string name, string itemTypeName, object content);
member this.New : string * string * string * obj -> System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject>
Public Function New (path As String, name As String, itemTypeName As String, content As Object) As Collection(Of PSObject)
Parameters
path
String String String

The path to the container to create item in. It may be a drive or provider-qualified path and may include glob characters.

name
String String String

The name of the new item to create.

itemTypeName
String String String

The type of the new item to create.

content
Object Object Object

The content of the new item to create.

Returns

The item that was 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) New(String[], String, String, Object, Boolean) New(String[], String, String, Object, Boolean)

Creates a new item at the given path.

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

The path(s) to the container to create item in. They may be drive or provider-qualified path and may include glob characters.

name
String String String

The name of the new item to create.

itemTypeName
String String String

The type of the new item to create.

content
Object Object Object

The content of the new item to create.

force
Boolean Boolean Boolean

Passed on to providers to force operations.

Returns

The item(s) that was 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