Easiest Way To Set Admin Password?

I want to be able to set a password for the admin account, I have tried editing the backend script and that didnt want to let me in, does anyone have a code snippet please?

You can set a password by checking the GetNetworkCredential on PSCredential.