Showing posts with label cmd. Show all posts
Showing posts with label cmd. Show all posts

Monday, September 4, 2023

CMD Command Prompt & Powershell Terminal

 

CMD

sfc /scannow
dism /online /cleanup-image /restorehealth

Copy boot files to Windows boot directory
bcdboot c:\Windows /s G: /f ALL
(c: is good window source and g: is boot partition)

FixWin11 context menu delete
reg delete HKCR\DesktopBackground\Shell\UWTSettings

Master Boot Record Fix
cd to the windows drive
bootrec /fixmbr
bootsect /nt60 SYS
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd

Print Directory Contents
Do this (works on folder and or file names)
dir /A:D /B > "filename.txt" (will create a txt file in the directory)
A activates switch mode
D restricts to display current path only
B restricts to name of folder only
or you can copy to clipboard
while in the directory type
dir /b | clip

Python Simpleserver
Python 2 — python -m SimpleHTTPServer 8000
Python 3 — python -m http.server 8000
Turn firewall off temporarily
(I would use HFS server) (maybe PairDrop.net)

Reboot to BIOS
shutdown /r /fw /t 0

Remove Files & Folders
rmdir /s /q path
If won't delete chkdsk /f on the drive.

Static IP Manually
Static IP Problems try this with your numbers. Maybe it will stick.
netsh interface ip set address “Ethernet” static 192.16.10.34 255.255.255.0 192.168.1.1

WiFi Connections Previously Connected
netsh wlan show profile (will give a list of previously connected WiFi networks)
netsh wlan show profile bobswifi key=clear (will give the passwords to bobswifi)


Windows Activation Check
slmgr /xpr
slmgr.vbs /dlv

Powershell

Chris Titus Windows Tools
Chris Titus powershell (irm christitus.com/win | iex)

Clipboard contents
Get-Clipboard

Remove files & folders
Remove-Item -Recurse -Force path

Reset Group Policy Settings to Default with Command Prompt
Open Command Prompt window as administrator and run following commands:
RD /S /Q "%WinDir%\System32\GroupPolicy"
RD /S /Q "%WinDir%\System32\GroupPolicyUsers" 

Linux

ip address or ip a

python3 -m http.server 8000
It may actually default to port 8000 without specification.

MX Linux live root password is "demo"

Ventoy in Linux
Grab tar and extract to folder (most file managers today can do this)
open terminal in folder
sudo sh Ventoy2Disk -i /dev/sdc
i = install
/dev/sdc = USB drive for Ventoy
If disk is already mounted you may need to unmount.

Software
sudo apt install fsearch
sudo apt install neofetch

Sunday, April 16, 2023

CMD To Reboot To BIOS Settings or Safe Mode

CMD To Reboot To BIOS Settings

Instead of guessing which F key will magically boot to the BIOS settings.
Open an admin command prompt (be sure you are in system32 directory).
shutdown /r /fw

shutdown /r /fw /f /t 0
/r reboot
/fw boot to firmware interface
/f force shutdown
/t 0 no wait time

CMD To Reboot To Safe Mode
bcdedit /set {current} safeboot minimal
bcdedit /set {current} safeboot network
(Win10+ is hopeless at WiFi in safe mode so have a cable handy)

When leaving Safe Mode
bcdedit /deletevalue {current} safeboot

Bonus:
Safe Mode Launcher by Sordum is available in Symenu if interested.

BitLocker

BitLocker: How to Protect Yourself Even If You Don’t Use It Many Windows users (including me) run local accounts and never intentionally ...