Last active
March 22, 2018 00:57
-
-
Save st0le/f82e3a7f77b8f83fe8d17a62d6428421 to your computer and use it in GitHub Desktop.
Simple Utility Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Find-FirstItem { | |
[CmdletBinding()] | |
[Alias("ffi")] | |
param( | |
[Parameter(Mandatory, Position = 0)] | |
[ValidateNotNullOrEmpty()] | |
[string] $Filter | |
) | |
Get-ChildItem -Recurse -Filter $Filter | Select-Object -First 1 -ExpandProperty FullName | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment