Aeveral ways to run a batch file with elevated (Administrator) rights and log everything it prints (stdout and stderr) to a text file. Methods range from quick one-offs to reusable PowerShell wrappers and scheduled, unattended runs.
Tested With: Windows 11 (should also work on Windows 10). Adjust paths as needed.