PathIntrinsics.SetLocation(String) PathIntrinsics.SetLocation(String) PathIntrinsics.SetLocation(String) Method


Changes the current location to the specified path.

public System.Management.Automation.PathInfo SetLocation (string path);
member this.SetLocation : string -> System.Management.Automation.PathInfo
Public Function SetLocation (path As String) As PathInfo
String String String

The path to change the location to. This can be either a drive-relative or provider-relative path. It cannot be a provider-internal path.


The path of the new current location.


If path does not exist, is not a container, or resolved to multiple containers.

If path refers to a provider that does not exist.

If path refers to a drive that does not exist.

If the provider associated with path threw an exception.

Applies to