Skip to content

Instantly share code, notes, and snippets.

@vScripter
Last active August 29, 2015 14:17
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 vScripter/e144c8ce4a77ce566b42 to your computer and use it in GitHub Desktop.
Save vScripter/e144c8ce4a77ce566b42 to your computer and use it in GitHub Desktop.
function Test-Function {
[cmdletbinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')]
param(
$ComputerName = $env:computername
)
PROCESS {
if($PSCmdlet.ShouldProcess($ComputerName,'Gathering Services')) {
Get-Service
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment