Created
February 28, 2018 20:04
-
-
Save Sambardo/b966b04e19a1cdae671ac5d5eb42f8ff 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 | |
} | |
} | |
MyFunction -service alg -confirm:$false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment