- Clean up WinSxS folder using DISM /cleanup-image
- How to enable the built-in Administrator account
- SYSPREP fails: ‘reserved storage in use’
- Disable Wi-Fi from the command line
- Windows kernel versions
- Topic
Various handy tips and shortcuts
Shift-F10: (during OOBE) open a Command WindowControl-Shift-F3: (during OOBE ) logs you in as AdministratorControl-Shift-Win-B: Windows desktop manager/display reset
Useful command-window commands:
- Reboot now :
C:> SHUTDOWN /R /T 0 - see who is logged on :
C:> QUERY USER - see if PC is joined to a domain :
C:> SET USER - see when last rebooted :
C:> NET STATISTICS WORKSTATIONORC:> SYSTEMINFO(also shows lots of other useful info, such as which Hotfixes have been installed) - recursive search for a file :
C:> DIR /S *REALTEK*( /S meaning “scan subfolders too” ) - Laptop battery health report:
C:>POWERCFG /BatteryReport- will write the report to a file and show you the filename
Useful Powershell/‘Terminal’ commands :
PS> Get-volume: show disk space used/free on all drivesPS> Get-printer: show printersPS> Get-printer | select name,portname: show printers’ IP addressesPS> GWMI -class Win32_BIOS: show BIOS version, serial number/Service Tag etcPS> Test-NetConnection -computername smtp.office365.com -port 587: check network connectivity to a specific (TCP) port on a remote server
Clean up Windows WinSxS folder
Using DISM /cleanup-image
If you have more than about 18GB used in C:>Windows\WinSxS folder , you can usually free up some space by deleting unused system files from the component store :
- first run the analysis step, which displays a report on how much space is used, how many unused components there are, followed by a recommendation on whether you should run the cleanup .
C:> dism /online /cleanup-image /analyzeComponentStore ( takes a couple of minutes)
- if it recommends a cleanup, run the next step :
C:> dism /online /cleanup-image /startComponentCleanup /resetbase ( may take 5+ minutes)
OR you could just save yourself a lot of typing by running Windows’ built-in Disk Cleanup Tool and choose the Windows Update cleanup option :)
How to enable the built-in Administrator account
- Windows 10 & 11 contain an Administrator account which is disabled by default. It can be useful to enable this, then use it to run SYSPREP. Note: must be run in an Elevated Command window:
C:> NET USER ADMINISTRATOR /ACTIVE:YES
SYSPREP fails: ‘reserved storage in use’
Sometimes when you run SYSPREP it may fail with an error like Audit mode cannot be turned on if reserved storage is in use.
If this error persists after a reboot and/or allowing Windows Update to complete any outstanding updates, then you can try the following:
- Run REGEDIT and set the following key to zero :
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ReserveManager\ActiveScenario - Open an elevated Command window and type the following:
C:> DISM /online /Set-ReservedStorageState /State:Disabled
Disable Wi-Fi from the command line
I once had a laptop whose Wi-Fi refused to come on when using the controls in the Settings app, or the switch in the System tray. The WiFi would come on briefly, then go off again.
It was fixed by opening an Elevated Command window and using the NETSH command as follows:
- use
NETSH INTERFACE SHOW INTERFACEto find the exact name of your Wi-Fi interface :
C:> netsh interface show interface
Admin State State Type Interface Name
-----------------------------------------------------------------
Enabled Disconnected Dedicated Ethernet
Disabled Disconnected Dedicated WiFi
-
use
NETSH INTERFACE SET INTERFACE "WiFi" admin=enableto enable the WiFi -
Note: you can use ‘admin=disable’ to turn off the WiFi
Windows kernel versions
If you ever come across an old Windows hard disk in your storage drawer and want to know what version of Windows it has on it, one way you can find out is by checking the Properties of C:\Windows\System32\NTOSKERNEL.exe : in the ‘Details’ tab it should show the version :
| Version | release |
|---|---|
| 10.0.x | Windows 10 / 11 |
| 6.3 | Windows 8.1 |
| 6.2 | Windows 8 |
| 6.1 | Windows 7 |
| 6.0 | Windows Vista |
| 5.2 | 2003 Server / XP 64-bit |
| 5.1 | Windows XP |
| 5.0 | Windows 2000 |
| 4.x | Windows NT 4 |
Another topic
Visit the Hugo website!