xxxxxxxxxx
# script.ps1
param($arg1, $arg2)
Write-Host "Argument 1: $arg1"
Write-Host "Argument 2: $arg2"
xxxxxxxxxx
Param (
[Parameter(Mandatory=$True, Position=1)]
[string]$String,
[Parameter(Mandatory=$True)]
[int]$Int,
[switch]$Switch = $false
)
xxxxxxxxxx
param (
[string]$server = "http://defaultserver",
[Parameter(Mandatory=$true)][string]$username,
[string]$password = $( Read-Host "Input password, please" )
)
xxxxxxxxxx
powershell -Command "& '<PATH_TO_PS1_FILE>' '<ARG_1>' '<ARG_2>' ... '<ARG_N>'"
xxxxxxxxxx
Start-Process -FilePath "C:\Program Files\MSBuild\test.exe" -ArgumentList /genmsi/f $MySourceDirectory\src\Deployment\Installations.xml