Partager via


PropertyCmdletProviderIntrinsics.Remove Method

Definition

Overloads

Remove(String, String)

Removes a property from the specified item(s)

Remove(String[], String, Boolean, Boolean)

Removes a property from the specified item(s)

Remove(String, String)

Removes a property from the specified item(s)

public:
 void Remove(System::String ^ path, System::String ^ propertyName);
public:
 void Remove(Platform::String ^ path, Platform::String ^ propertyName);
void Remove(std::wstring const & path, std::wstring const & propertyName);
public void Remove (string path, string propertyName);
member this.Remove : string * string -> unit
Public Sub Remove (path As String, propertyName As String)

Parameters

path
String

The path to the item(s) on which the property should be removed.

propertyName
String

The property name that should be removed.

Exceptions

If path or property 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

Remove(String[], String, Boolean, Boolean)

Removes a property from the specified item(s)

public:
 void Remove(cli::array <System::String ^> ^ path, System::String ^ propertyName, bool force, bool literalPath);
public:
 void Remove(Platform::Array <Platform::String ^> ^ path, Platform::String ^ propertyName, bool force, bool literalPath);
void Remove(std::Array <std::wstring const &> const & path, std::wstring const & propertyName, bool force, bool literalPath);
public void Remove (string[] path, string propertyName, bool force, bool literalPath);
member this.Remove : string[] * string * bool * bool -> unit
Public Sub Remove (path As String(), propertyName As String, force As Boolean, literalPath As Boolean)

Parameters

path
String[]

The path(s) to the item(s) on which the property should be removed.

propertyName
String

The property name that should be removed.

force
Boolean

Passed on to providers to force operations.

literalPath
Boolean

If true, globbing is not done on paths.

Exceptions

If path or property 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