Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.