Uploaded simpler and more complex script.
Added detection of admin right and prompt for credential if necessary.
Separate files for each function for those who want a simple code.