PropertyCmdletProviderIntrinsics.Set PropertyCmdletProviderIntrinsics.Set PropertyCmdletProviderIntrinsics.Set Method

Definition

Overloads

Set(String, PSObject) Set(String, PSObject) Set(String, PSObject)

Sets the specified properties on the specified item(s)

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

Sets the specified properties on the specified item(s)

Set(String, PSObject) Set(String, PSObject) Set(String, PSObject)

Sets the specified properties on the specified item(s)

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

The path to the item to set the properties on.

propertyValue
PSObject PSObject PSObject

The properties that are to be set on the item

Returns

A PSObject for each item that had the property set on it.

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[], PSObject, Boolean, Boolean) Set(String[], PSObject, Boolean, Boolean) Set(String[], PSObject, Boolean, Boolean)

Sets the specified properties on the specified item(s)

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

The path(s) to the item(s) to set the properties on.

propertyValue
PSObject PSObject PSObject

The properties that are to be set on the item

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 had the property set on it.

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