function Get-Something { Param ( [Parameter(Mandatory=$true, Position=0)] [string] $Name, [Parameter(Mandatory=$true, Position=1)] [int] $Id ) # Write the output to the console Write-Output "Name: $Name, Id: $Id" } Get-Something "Alice" 42
Get-Something("Alice", 42)
You can use named parameters to get round this, e.g.
Get-Something -Name "Alice" -Id 42
You can use named parameters to get round this, e.g.
Still a bit of a gotcha!