Powershell Scripting Tutorial
Introduction Tools required for Powershell First Powershell script Interacting with userSpecial characters in Windows Powershell scriptingArrays String manipulation Conditional statements Looping statements Passing arguments Passing named arguments Exit status of the script Writing functionsPassing arguments in windows powershell scripting
Create a simple script “s1.ps1” with below content.
echo $args.length
for ([int]$i=0;$i -lt $args.length;$i++) {
echo “Argument number $i is $($args[$i])”
}
Then you can invoke above script using below command. Here is the sample output of above command.
> ./s1.ps1 <param1> <param2>

Web development and Automation testing
solutions delivered!!