Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Test-Path

Test-Path - Powershell 2.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »


Short description
Determines whether all elements of a path exist.

Test-Path [-LiteralPath] <string[]> [-Credential <PSCredential>] [-Exclude <string[]>] [-Filter <string>] [-Include
 <string[]>] [-IsValid] [-PathType {Any | Container | Leaf}] [-UseTransaction] [<CommonParameters>]

Test-Path [-Path] <string[]> [-Credential <PSCredential>] [-Exclude <string[]>] [-Filter <string>] [-Include <strin
g[]>] [-IsValid] [-PathType {Any | Container | Leaf}] [-UseTransaction] [<CommonParameters>]

The Test-Path cmdlet determines whether all elements of the path exist. It returns TRUE ($true) if all elements exi
st and FALSE ($false) if any are missing. It can also tell whether the path syntax is valid and whether the path le
ads to a container or a terminal (leaf) element.