Issue with enable-csuer when the user first name contain spaces
I have run into an issue with the set-csuser command in a few deployments. The error occurs when I try to use set-csuser with the "-sipaddresstype firstlastname" switch.
If I changed the -sipaddresstype from "firstlastname" to "emailaddress", I was able to use the script to enable the same user.
It turned out this user had two first names (with a space between) in the fname property in AD (fname="First Name"). If I removed one of them (fname="First"), or used a hyphen between them (fname="First-Name"), the script started working again.