Quantcast
Channel: SharePoint 2010 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 13778

New-SpSite cmdlet with parameters list

$
0
0

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.


Viewing all articles
Browse latest Browse all 13778

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>