take in powershell arguments code example
Example 1: parameter powershell
Param (
[Parameter(Mandatory=$True, Position=1)]
[string]$String,
[Parameter(Mandatory=$True)]
[int]$Int,
[switch]$Switch = $false
)
Example 2: execute powershell script from command line with parameters
powershell -Command "& '<PATH_TO_PS1_FILE>' '<ARG_1>' '<ARG_2>' ... '<ARG_N>'"