powershell function declaration syntax
At the most basic level, a function definition (i.e., the code that defines the function) requires the function keyword, the function's name, and a script block, as the following syntax shows: The script block, which needs to be enclosed in braces, contains the statements that run when you call the function.