Get-Files is used internally by a number of other cmdlets to locate files.
Given a starting directory,
Get-Files recursively examines it and all subdirectories for files whose names match one of the items on the
-Include list (or all files if
-Include is unspecified) but none on the
Get-Files returns an array of paths to the resulting files, relative to
Get-Files ` [-Dir <string>] ` [-Include <string>] ` [-Exclude <string>]
|The directory to search for files. Relative paths will be resolved relative to the script execution path.
|A string array of RegEx patterns. If a file matches any of them, it will be included in the returned list unless it also matches an exclusion.
|A string array of RegEx patterns. If a file matches any of them, it will be excluded from the returned list.