Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
PowerShell takes a while to learn – especially if you have an aversion to manuals as I do – I prefer to learn on the fly. So, when I wanted to convert a variable containing a comma delimited string into an array I was lost. After a bit of playing and ‘binging’ I found that it was actually very very easy:
# start with a string $roles = "db_owner"# now it’s an array of 1 element$roles = ,$roles
Sweet!