PowerShell: Functions Cheat Sheet

# A basic PowerShell function

function add ($a, $b) { $a + $b }
# A PowerShell Advanced Function, with all three blocks declared: BEGIN, PROCESS, END

function Do-Something {
  [CmdletBinding]()]
  param ()
  begin { }
  process { }
  end { }
}

		

Leave a Reply

Your email address will not be published. Required fields are marked *