Jamie, my assumption is when the AD object is sync'ed to O365, these attributes should have a <Null> value and once the objects show up in O365 portal, simply by assigning a valid license for lync should populate these values.
Is above not the case ?
As far the script, instead you can use ADModify tool to assign all users those properties in hardly few seconds (you need to run it 3 times for each attribute)
But I am still concerned that above is not required and assigning Lync license should take care of it, if not, I will try to repro this pretty quick.