Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sure! Here's an example of a simple PowerShell function that takes two inputs and returns one output:
- ```PowerShell
- function Add-Numbers ($a, $b) {
- $sum = $a + $b
- return $sum
- }
- ```
- This function takes two input parameters `$a` and `$b`, adds them together and assigns the result to the variable `$sum`. The `return` statement then outputs the value of `$sum`.
- You can call this function like this: `Add-Numbers 3 5` and it will return `8`.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement