Hi everyone !
In a PS script on a Sharepoint server, I'm trying to call a cmdlet with some arguments.
This is OK :
New-SpSite -url $url -owneralias $owneralias
However, I have the requirement to create a parameter list with arguments that sometimes are present, sometimes not. So I thought it was possible to create a string like this $Paramlist = "-url "+$url+" -owneralias "+$owneralias ... But It's not ok, PS give me various errors.
What is the best method to construct a parameters list ?
TY for your assistance. Have a nice day.
J.










