I have a script to which I pass server name(s) in $args.
This way I can do stuff to this (these) server(s) using foreach:
foreach
.\\script.ps1
One way to do it would be like this:
param( [Parameter(Position=0)][String]$Vlan, [Parameter(ValueFromRemainingArguments=$true)][String[]]$Hosts ) ...
This would allow multiple hosts to be entered with spaces.