Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@shaneis
Created October 20, 2017 09:11
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 shaneis/e7b884b1d53451cc19d0e2d2946afd91 to your computer and use it in GitHub Desktop.
Save shaneis/e7b884b1d53451cc19d0e2d2946afd91 to your computer and use it in GitHub Desktop.
When intuition proves me an idiot
$fileNames | ForEach-Object -Process {
switch ($_) {
($_ -match 'Index') { "Use index on: $_" }
($_ -match 'Stats') { "Use stats on: $_" }
($_ -match 'Backups') { "Use backups on: $_" }
($_ -match 'Restores') { "Use restores on: $_" }
($_ -match 'Checkdbs') { "Use checkdbs on: $_" }
Default { "didn't match anything..." }
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment