Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sure! Here's another example of a simple PowerShell function that takes two inputs and returns one output:
- ```PowerShell
- function Get-FullName ($firstName, $lastName) {
- $fullName = "$firstName $lastName"
- return $fullName
- }
- ```
- This function takes two input parameters `$firstName` and `$lastName`, concatenates them with a space in between and assigns the result to the variable `$fullName`. The `return` statement then outputs the value of `$fullName`.
- You can call this function like this: `Get-FullName "John" "Doe"` and it will return `"John Doe"`.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement