Tag: How to use Parameters in PowerShell

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

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

 22,759 total views,  32 views today

 22,759 total views,  32 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