Functions/Find-File.ps1
function Find-File { [CmdletBinding()] param ( [Parameter(Mandatory)] [string] $SearchString, # [Parameter()] [switch] $Fullname, [Parameter()] [switch] $AndDirectories, [Parameter()] [string] $Path = "." ) $Param = @{} if (!($AndDirectories)) { $Param.File = $true } $Results = Get-ChildItem $Path *$SearchString* -Recurse @Param $Results = $Results.FullName return $Results } |