http://blogcastrepository.com/blogs/mattbro/articles/1354.aspx
I recently had to use this in an emergency to modify 2500 user accounts so they could access a specific Citrix server so NFuse would work properly. I eventually helped our Citrix team find the settings that they needed to change so that all NFuse users didn't need access to that specific Citrix server. But I was certainly glad that I had this script already written. We had a ton of surgeons that couldn't get into their surgery software until I used this script to apply our temporary band-aid until we found the root cause.