For a random number
Go to a command prompt: echo %random%
To set an account to a random password
net user [username] /random
It will then print out the random password. Be sure to write it down.
Ex: C:> net user guest /random
Password for guest is: tP4edm68
The command completed successfully.