Second part, if you are in following the password reset procedure, the command to factory-default the controller is: write erase all
Make sure that before you do that, the licenses are recorded so you can put them back after the factory reset. Use the WebUI for that or on the CLI the command: show licenses.