@echo off
:: Auto-elevate to Administrator
net session >nul 2>&1
if %errorLevel% neq 0 (
    powershell -Command "Start-Process '%~0' -Verb RunAs"
    exit /b
)

:: Run PowerShell command
powershell.exe -ExecutionPolicy Bypass -Command "New-SelfSignedCertificate -FriendlyName LocalServer -DnsName LocalServer -CertStoreLocation Cert:\LocalMachine\My -KeyUsage DigitalSignature"