Created
February 28, 2018 20:03
-
-
Save Sambardo/f6c85f607a974c04e2657e6d669df893 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function MyFunction | |
{ | |
[cmdletbinding(SupportsShouldProcess, | |
ConfirmImpact = "high")] | |
param($service) | |
if($PSCmdlet.ShouldProcess($service,"Fetch service")) | |
{ | |
get-service -name $service | |
} | |
} | |
write-host "calling normally" -ForegroundColor Yellow | |
MyFunction -service alg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment