Udostępnij za pośrednictwem


PropertyCmdletProviderIntrinsics.Clear Method

Definition

Overloads

Clear(String, Collection<String>)

Clear the specified properties from the specified item(s)

Clear(String[], Collection<String>, Boolean, Boolean)

Clear the specified properties from the specified item(s)

Clear(String, Collection<String>)

Clear the specified properties from the specified item(s)

public:
 void Clear(System::String ^ path, System::Collections::ObjectModel::Collection<System::String ^> ^ propertyToClear);
public void Clear (string path, System.Collections.ObjectModel.Collection<string> propertyToClear);
member this.Clear : string * System.Collections.ObjectModel.Collection<string> -> unit
Public Sub Clear (path As String, propertyToClear As Collection(Of String))

Parameters

path
String

The path to the item to clear the properties from.

propertyToClear
Collection<String>

The properties to clear from the item(s).

Exceptions

If path or propertyToClear is null.

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.

If the provider threw an exception.

Applies to

Clear(String[], Collection<String>, Boolean, Boolean)

Clear the specified properties from the specified item(s)

public:
 void Clear(cli::array <System::String ^> ^ path, System::Collections::ObjectModel::Collection<System::String ^> ^ propertyToClear, bool force, bool literalPath);
public void Clear (string[] path, System.Collections.ObjectModel.Collection<string> propertyToClear, bool force, bool literalPath);
member this.Clear : string[] * System.Collections.ObjectModel.Collection<string> * bool * bool -> unit
Public Sub Clear (path As String(), propertyToClear As Collection(Of String), force As Boolean, literalPath As Boolean)

Parameters

path
String[]

The path(s) to the item(s) to clear the properties from.

propertyToClear
Collection<String>

The properties to clear from the item(s).

force
Boolean

Passed on to providers to force operations.

literalPath
Boolean

If true, globbing is not done on paths.

Exceptions

If path or propertyToClear is null.

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.

If the provider threw an exception.

Applies to