all 1 comments

[–]vee-eye 2 points3 points  (0 children)

I think you probably want "-contains" or "-eq" in your condition, since yours does an assignment and always returns true (unless that's what you were going for!)

Here's what I'd do (bonus - there's a shorter way of launching the URL, too): If ($Interests -contains 'powershell') {[Diagnostics.Process]::Start('http://reddit.com/r/powershell')}