Skype for Business Mass Policy update for all users

I recently has a requirement from a customer to roll out the same policies to all users that had a SfB account in Office 365.  The task in its self is not difficult but I found that extracting the SIP address via the SipProxyAddress attribute didn’t work as expected.  The command used to get all the enable users was:

The idea of the command is to filter all enabled Skype users and save the users SIP address into the $allusers variable. What I found is the SipProxyAddress has a mass of trailing white spaces after the text has finished. So to remove the white spaces another command was applied after:

Now we have a clean list of SIP enabled users that we can call up on. So the next part is to apply the required policies to the users, this was done using a foreach:

Just to understand how many users we have touched I added a count using $countUsers++

And that it is, putting all of this together and running it really will be a one time operation. It will over-write any existing policies that are currently applied to the users.




No Comments


You can leave the first : )