:: Method 2: Try PowerShell Method echo [2] Attempting PowerShell extraction... powershell -command "Get-WmiObject -Class SoftwareLicensingService | Select-Object -Property OA3xOriginalProductKey" > "%temp%\pskey.txt" 2>nul findstr /C:"-" "%temp%\pskey.txt" >nul if %errorlevel% equ 0 ( echo [+] PowerShell Extraction Successful: type "%temp%\pskey.txt" | findstr /V "OA3xOriginalProductKey" ) else ( echo [-] PowerShell method failed. ) del "%temp%\pskey.txt" 2>nul echo.
Would you like a version of get-keys.bat that only outputs the Windows key (without VBS or Office scanning)?
Since you didn't provide the specific source code for get-keys.bat , I have to make assumptions based on standard penetration testing practices and CTF (Capture The Flag) challenges.
Press Windows Key + R , type notepad , and press Enter.
@echo off setlocal enabledelayedexpansion