Skip to content

Instantly share code, notes, and snippets.

@st0le
Last active March 22, 2018 00:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save st0le/f82e3a7f77b8f83fe8d17a62d6428421 to your computer and use it in GitHub Desktop.
Save st0le/f82e3a7f77b8f83fe8d17a62d6428421 to your computer and use it in GitHub Desktop.
Simple Utility Function
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