Advertisement
Guest User

Untitled

a guest
Feb 16th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. Function Set-WithConfirmation {
  2. [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='High')]
  3. param ()
  4.  
  5. if ($PSCmdlet.ShouldProcess('My Resource', 'Run')) {
  6. Write-Host "Did process"
  7. } else {
  8. Write-Host "Didn't process"
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement