Like any scripting language, Windows PowerShell lets you create functions that you can reference within PowerShell statements. A function is basically a named block of code. When you call the function name, the script block within that function runs.You can include any PowerShell statements within the script block, and you can add input parameters so you can use the same function in different situations.Let's look at how to create functions, define input parameters, and work with functions in PowerShell scripts.ou can include any PowerShell statements within the script block, and you can add input parameters so you can use the same function in different situations. Let's look at how to create functions, define input parameters, and work with functions in PowerShell scripts.