# User CertReq in Powershell to create your cert using the SHA256 (SHA-256) signature algorithm and a 2048 bit key size (RSA) ## <# JWJ0215 2023 #> # This will create your inf and save to your personal folder 'C:\Users\your name\' $Date = (Get-Date).ToString('ddMMyyyy') $ReqFile = "Cert_Req-$CodeSigning-" + "$Date" + ".req" $InfFile = @" [NewRequest]`r Subject = "CN=$CodeSigningCert"`r KeySpec = 1 KeyLength = 2048 Exportable = TRUE`r RequestType = CMC`r "@ Write-Host "Generating Certificate Request file..." -ForegroundColor Yellow; $FinalInfFile = "Cert_Req_Inf-JWJ0215" + "$Date" + ".inf" New-Item $FinalInfFile -type file -value $InfFile cmd /c "certreq -new $FinalInfFile $ReqFile" Write-Host " " Write-Host "Certificate request file for $WebsiteName successfully generated!" -foregroundcolor DarkGreen;