ItemCmdletProviderIntrinsics.Set ItemCmdletProviderIntrinsics.Set ItemCmdletProviderIntrinsics.Set Method

Definition

Overloads

Set(String, Object) Set(String, Object) Set(String, Object)

Sets the item at the specified path.

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

Sets the item at the specified path.

Set(String, Object) Set(String, Object) Set(String, Object)

Sets the item at the specified path.

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

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

value
Object Object Object

The new value to set the item to.

Returns

The object(s) set at the specified path.

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.

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

Sets the item at the specified path.

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

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

value
Object Object Object

The new value to set the item to.

force
Boolean Boolean Boolean

Passed on to providers to force operations.

literalPath
Boolean Boolean Boolean

If true, globbing is not done on paths.

Returns

The object(s) set at the specified path.

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