Get-Item retrieves an item such as a file, directory, or registry key. Its behavior depends on the parameter set selected by the parameters you provide. section 3.5.1
Use the help syntax to distinguish the two main ways to specify the item:
- Use -Path for the parameter set that accepts a path value. section 3.5.1
- Use -LiteralPath for the alternative parameter set; -Path and -LiteralPath are mutually exclusive. section 3.5.1
- Use shared options such as -Filter in either set, while common parameters are available across cmdlets. section 3.5.1
Provide the path positionally
Get-Item ~ -Filter * is valid. Because -Path is the first positional parameter, PowerShell assigns ~ to -Path; the named -Filter parameter receives *. section 3.5.3
SYNTAX Get-Item [-Stream <String[]>] [-Credential <PSCredential>] [-Exclude <String[]>] [-Filter <String>] [-Force] [-Include <String[]>] -LiteralPath <String[]> [<CommonParameters>] Get-Item [-Path] <String[]> [-Stream <String[]>] [-Credential <PSCredential>] [-Exclude <String[]>] [-Filter <String>] [-Force] [-Include <String[]>] [<CommonParameters>]
Use the syntax listing to compare the -LiteralPath and -Path parameter sets and identify optional parameters. section 3.5.1

