đ This can be done using the latest Rufus version to create a bootable USB drive with the preconfigured necessary bypasses and automatic local user creation on the bootable Windows 11 ISO.
At the first boot in OOBE (Out-of-the-box experience), select Region and Keyboard layout
On the "Let's connect you to a network" screen, press SHIFT+F10 on the keyboard to open the Command Prompt, type the following command and wait for the reboot.
OOBE\BYPASSNRO
After the reboot, click I don't have internet when asked to connect and Continue with limited setup.
Create a local default Windows 11 account and proceed.
Disable and answer No to all the Privacy Settings if not needed.
â The repositories above contain many useful and powerful scripts. Be sure to review them carefully before applying to your system, and do so at your own risk. â ī¸
Create a UpgradePackages.bat with the following content and run it to upgrade installed packages
@echo off
:: Check for admin rights
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
:: If error flag set, we do not have admin rights, so prompt for them
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
powershell.exe -Command "Start-Process '%~dpnx0' -Verb RunAs"
exit /B
)
:: Set the execution policy to allow local scripts to run
powershell -NoProfile -Command "Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force"
:: Run the winget upgrade command and log the output live
powershell -NoProfile -Command "Start-Transcript -Path UpgradeLog.txt -Force; winget upgrade --all; Stop-Transcript"
:: Indicate completion
echo All packages have been upgraded. Press any key to exit...
pause
cmd Cheatsheet
# System
set
set /?
ver
systeminfo
chkdsk
driverquery
sfc /scannow
shutdown /r
shutdown /a
# Network
ipconfig /all
ping example.com
tracert example.com
nslookup example.com
netstat -abon
netstat -abon | findstr :3389
# Files and Disk
cd
dir
dir /a
dir /s
mkdir dirname
rmdir dirname
type
more
copy
copy *.md
move
del
erase
# Tasks and Processes
tasklist
tasklist /FI "imagename eq notepad.exe"
tasklist /FI "pid eq 1516"
taskkill /PID targetpid
Powershell commands
PS1 Scripts
# 1. Run the script with Bypass mode (One-time execution)
powershell -ExecutionPolicy Bypass -File <SCRIPT.ps1>
# Shorter version
powershell -ep Bypass -f <SCRIPT.ps1>
# 2. Temporarily set execution policy for the current session
Set-ExecutionPolicy Bypass -Scope Process -Force
<SCRIPT.ps1> # Now run the script
# 3. Unblock the script file (if marked as untrusted)
Unblock-File -Path <SCRIPT.ps1>
<SCRIPT.ps1> # Try running again
# 4. Run the script without changing execution policy (using Invoke-Expression)
powershell -Command "Get-Content <SCRIPT.ps1> | Invoke-Expression"
# Alternative (more compact)
iex (Get-Content <SCRIPT.ps1> -Raw)
# 5. Change execution policy permanently (requires admin)
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force # Allows all scripts
Set-ExecutionPolicy RemoteSigned -Scope LocalMachine -Force # Allows only signed remote scripts
# 6. Run with -NoProfile to ignore execution policies
powershell -NoProfile -ExecutionPolicy Bypass -File <SCRIPT.ps1>
# 7. Reset execution policy back to restricted (optional, for security)
Set-ExecutionPolicy Restricted -Scope CurrentUser -Force # Blocks all scripts again
Run a cmd.exe process with administrator privileges
Run diskpart
Type: list disk then sel disk X where X is the drive your boot files reside on
Type list vol to see all partitions (volumes) on the disk (the EFI volume will be formatted in FAT, others will be NTFS)
Select the EFI volume by typing: sel vol Y where Y is the SYSTEM volume (this is almost always the EFI partition)
For convenience, assign a drive letter by typing: assign letter=M: where M is a free (unused) drive letter
Type exit to leave disk part
While still in the cmd prompt, type: M: and hit enter, where M was the drive letter you just created.
Type dir to list directories on this mounted EFI partition
If you are in the right place, you should see a directory called EFI
Type cd EFI and then dir to list the child directories inside EFI
Type rmdir /S ubuntu to delete the ubuntu boot directory
## These commands are used to identify and select the hard drive
diskpart
list disk
sel disk 0
## These commands are used to list the partitions, select the Boot EFI partition,
## then assign it a drive letter
list vol
sel vol 2
assign letter=D:
exit
## These commands are used to change into the Boot EFI folder and delete the GRUB folder
cd /d D:
ls
ls EFI
cd EFI
ls
rmdir /s ubuntu