You can tokenise the scripts to obfuscate the script so that the password should not be visible and I believe that there is a program call kixcrypt which probably does something similar.

However, while I don't entirely understand what your script is doing as my scripting skills are nothing to write home about, I don't agree with your putting any passwords into the script. This is bad policy. I wrote an article called step by step guide to running a script with elevated or admin privileges.

http://kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=205798#Post205798

This may not help you, as I am not entirely clear what you want your script to do although I am guessing that you want to get the domain admin username based on the name of your function! Like I said my scripting is nothing to write home about!

There are other people on this forum who are far better qualified than I to help you with your actual query as in how to obfuscate your script, but I wanted to highlight that if you can find a way to write your script without putting in usernames and passwords, then you should do that. My step by step guide allows you to elevate the privileges of the script by using task scheduler, so the password to elevate script is never within the script. I realise thats not what you are doing here, but I just wanted to highlight that putting passwords into scripts equals a bad idea!

Hope this helps somewhat.