Thanks Ian for the info, guess I should probably give more background on why I am asking. Also, I didn't know there was such privelege management systems out there, may recommend looking into this as we do have a lot of IT and other users constantly requesting local machine admin access.
So our environment is controlled by a domain, both users and computers but at times we have to manaully add users to the local administrators group so they can use software that requires elevated privlages, not what we want in our mind as we have about 50k machines globally. The majority are just users of their machines and nothing more but we do have extenuating circumstances.
At times with old DS6.9 we would just reference the local database to figure out who the current logged on user was and add them to the administrators group very similar to my example script I posted above. It worked well but we want to migrate it over to ITMS as we will be turning down 6.9 eventually as it is a nightmare to manage in our enviornment, hence why we chose to move to ITMS as it can manage large environments with a single console very efficiently.
Coming from an enviornment that has multiple solutions for the same areas of the company and having a very fragmented IT environment, to properly centerilize IT I can't see having mulitple deployment solutions. So that is why my opinion is very direct and sparse as I do understand some environments require both and if they do I would be asking the question, is their a better product for us then.
Thanks for the help, its greatly appriceiated.