16. October 2014
Andy Schneider
Function Test-Something {
[Alias("ts")]
[CmdletBinding(SupportsShouldProcess)]
param(
[Parameter(ValueFromPipeline)]
$What
)
Process {
if ($pscmdlet.ShouldProcess($What)) {
}
} # End Process
} # En
I picked this tip up on one of the videos from the PS Summit in Europe. If I paste this into a PS session, I will get the alias automatically. #learnSomethingNewEveryDay