Skip to content

Instantly share code, notes, and snippets.

@Curtmcgirt
Created September 23, 2019 23:51
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 Curtmcgirt/de7fafec1255a50174fc6746449897ac to your computer and use it in GitHub Desktop.
Save Curtmcgirt/de7fafec1255a50174fc6746449897ac to your computer and use it in GitHub Desktop.
posh v2
foreach($source in $sources)
{
$sourcepath = $source.path.replace('\','/')
$count = ($allstats | ? sourcefilename -like "*$sourcepath*").count
$array += [pscustomobject]@{count = $count; path = $source.path}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment