Tag: PowerShell function–parameters-data types-return

PowerShell: How to pass multiple parameters into a function in PowerShell

PowerShell: How to pass multiple parameters into a function in PowerShell

 59,765 total views,  2 views today

 59,765 total views,  2 views today In this post, I will show how to pass multiple parameters into a function in PowerShell coding.  Addition of numbers function using PowerShell example: cls #The below sample function will accept numeric parameters and do the addtion. Function Add-Numbers() { param ( [Parameter(Mandatory=$true)] [int32] $FirstNumber, [Parameter(Mandatory=$true)] [int32] $SecondNumber, [Parameter(Mandatory=$false)][int32] $ThirdNumber )

Continue reading