@echo off echo Dell iDRAC 6 SSL Key upload system echo. echo ===[credentials]=== set default_hostname=your.idrac.address rem Host Section set /p host="Host (Default. %default_hostname%): " IF NOT DEFINED host ( echo Host was not provided, using %default_hostname% set host=%default_hostname% ) rem Username Section set /p idrac_username=Username (Default. root): IF NOT DEFINED idrac_username ( echo Username was not provided, using root set idrac_username=root ) rem Password Section set /p password=Password: IF NOT DEFINED password ( echo Password was not provided, Terminating! echo. pause goto end ) echo. echo ===[credentials check]=== echo Host: %host% echo Username: %idrac_username% echo Password: %password% echo. echo Is this correct? Press any key to continue. pause>nul echo. echo ===[validating]=== IF NOT EXIST certs ( echo certs directory is not existent! echo please extract letsencrypt certificate and unzip it to certs directory using echo letsencrypt certificate loader echo. pause goto end ) echo validation complete! echo. echo ===[get remote config]=== echo getting remote config racadm -r %host% -u %idrac_username% -p %password% -v 4 getconfig -g cfgRacSecurity echo. echo if you are getting inadequate size (ex. 1024), please change it with command echo. echo racadm -r %host% -u %idrac_username% -p %password% config -g cfgRacSecurity -o cfgRacSecCsrKeySize 2048 echo. echo else, continue. pause>nul echo. echo ===[uploading]=== echo uploading private key... racadm -r %host% -u %idrac_username% -p %password% -v 4 sslkeyupload -t 1 -f .\certs\privkey.pem echo private key uploaded. echo. echo uploading certificate... racadm -r %host% -u %idrac_username% -p %password% -v 4 sslcertupload -t 1 -f .\certs\cert.pem echo certificate uploaded. echo. echo ===[done]=== echo done. echo. pause :end