powershell - convert System.String to MultiValuedProperty -


i trying create user execution script prompt users , feed them command using variable. this:

$owners  = read-host $members = read-host  new-distributiongroup -name test -managedby $owners -members $members 

the problem read-host provides typename of system.string , -managedby , -members switches require multivaluedproperty. i've tried doing export of system.string csv, doesn't break multiple values if separated comma.

i know if populate csv , import work distributing script branch offices , need them have few steps possible.

so if string provide comma delimited string can like.

$owners = (read-host).split(',') 

much same members...


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -