Skip to content

Instantly share code, notes, and snippets.

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 ProgrammingWithHandGrenades/f5d34850b90639949fbb to your computer and use it in GitHub Desktop.
Save ProgrammingWithHandGrenades/f5d34850b90639949fbb to your computer and use it in GitHub Desktop.
March 2016 Scripting Games Solution demonstrating regex character class subtraction.
Get-ChildItem \\servername\sharename -Recurse -Force |
Where { $_.Name -match '[\u00C0-\u00FF -[\u00D7\u00F7]]'} |
ForEach-Object {[PSCustomObject]@{Name=$_.Name;Directory=$_.Directory;'Creation Date'=$_.CreationTime;'Last Modification Date'=$_.LastWriteTime;'File Size'=$_.Length} } |
Format-Table -AutoSize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment