[{"data":1,"prerenderedAt":720},["ShallowReactive",2],{"en-post-88":3},{"id":4,"title":5,"body":6,"description":12,"extension":713,"meta":714,"navigation":715,"path":716,"seo":717,"stem":718,"__hash__":719},"content/post/88.md","88",{"type":7,"value":8,"toc":703},"minimark",[9,13,18,58,62,132,145,149,194,204,208,243,258,262,268,590,594,635,639,673,677,699],[10,11,12],"p",{},"The command line is the \"master key\" for troubleshooting Windows. Many problems (no network, corrupted system files, disk errors, checking specs) are faster typed than clicked. This is organized by scenario, so bookmark it.",[14,15,17],"h2",{"id":16},"_1-how-to-open-the-command-line","1. How to open the command line",[19,20,21,41,44],"ul",{},[22,23,24,28,29,32,33,36,37,40],"li",{},[25,26,27],"code",{},"Win + R"," > type ",[25,30,31],{},"cmd"," (Command Prompt) / ",[25,34,35],{},"powershell"," / ",[25,38,39],{},"wt"," (Windows Terminal).",[22,42,43],{},"Right-click the Start menu > Terminal (admin).",[22,45,46,47,50,51,50,54,57],{},"Commands that need admin rights (",[25,48,49],{},"sfc",", ",[25,52,53],{},"chkdsk",[25,55,56],{},"diskpart",") must run as administrator or they fail.",[14,59,61],{"id":60},"_2-network-diagnostics-most-frequent","2. Network diagnostics (most frequent)",[63,64,68],"pre",{"className":65,"code":66,"language":31,"meta":67,"style":67},"language-cmd shiki shiki-themes github-light github-dark","ipconfig                 :: see IP/gateway/DNS\nipconfig /release       :: release IP\nipconfig /renew         :: renew IP\nipconfig /flushdns      :: clear DNS cache\nping 8.8.8.8            :: test connectivity\nping www.baidu.com      :: test DNS resolution\ntracert www.baidu.com   :: trace route\nnetstat -ano            :: see port usage (who holds 80/443)\nnetsh winsock reset     :: reset Winsock\nnetsh int ip reset      :: reset TCP/IP\n","",[25,69,70,78,84,90,96,102,108,114,120,126],{"__ignoreMap":67},[71,72,75],"span",{"class":73,"line":74},"line",1,[71,76,77],{},"ipconfig                 :: see IP/gateway/DNS\n",[71,79,81],{"class":73,"line":80},2,[71,82,83],{},"ipconfig /release       :: release IP\n",[71,85,87],{"class":73,"line":86},3,[71,88,89],{},"ipconfig /renew         :: renew IP\n",[71,91,93],{"class":73,"line":92},4,[71,94,95],{},"ipconfig /flushdns      :: clear DNS cache\n",[71,97,99],{"class":73,"line":98},5,[71,100,101],{},"ping 8.8.8.8            :: test connectivity\n",[71,103,105],{"class":73,"line":104},6,[71,106,107],{},"ping www.baidu.com      :: test DNS resolution\n",[71,109,111],{"class":73,"line":110},7,[71,112,113],{},"tracert www.baidu.com   :: trace route\n",[71,115,117],{"class":73,"line":116},8,[71,118,119],{},"netstat -ano            :: see port usage (who holds 80/443)\n",[71,121,123],{"class":73,"line":122},9,[71,124,125],{},"netsh winsock reset     :: reset Winsock\n",[71,127,129],{"class":73,"line":128},10,[71,130,131],{},"netsh int ip reset      :: reset TCP/IP\n",[10,133,134,135,138,139,144],{},"The PowerShell equivalent of ping is ",[25,136,137],{},"Test-NetConnection www.baidu.com",". For network issues see ",[140,141,143],"a",{"href":142},"/post/42/","Browser Can't Open Web Pages, but WeChat Works",".",[14,146,148],{"id":147},"_3-system-files-and-disk","3. System files and disk",[63,150,152],{"className":65,"code":151,"language":31,"meta":67,"style":67},"sfc /scannow                          :: verify and repair system files\nchkdsk /f /r                          :: check and fix disk errors (needs restart)\ndiskpart                              :: partition/format (dangerous, use with care)\nshutdown /s /t 0                      :: shut down immediately\nshutdown /r /t 0                      :: restart immediately\nshutdown /a                           :: cancel a pending shutdown\ncipher /w:C                           :: securely wipe free space on C\nrobocopy source dest /E /R:1 /W:1    :: copy large files/folders (more reliable than xcopy)\n",[25,153,154,159,164,169,174,179,184,189],{"__ignoreMap":67},[71,155,156],{"class":73,"line":74},[71,157,158],{},"sfc /scannow                          :: verify and repair system files\n",[71,160,161],{"class":73,"line":80},[71,162,163],{},"chkdsk /f /r                          :: check and fix disk errors (needs restart)\n",[71,165,166],{"class":73,"line":86},[71,167,168],{},"diskpart                              :: partition/format (dangerous, use with care)\n",[71,170,171],{"class":73,"line":92},[71,172,173],{},"shutdown /s /t 0                      :: shut down immediately\n",[71,175,176],{"class":73,"line":98},[71,177,178],{},"shutdown /r /t 0                      :: restart immediately\n",[71,180,181],{"class":73,"line":104},[71,182,183],{},"shutdown /a                           :: cancel a pending shutdown\n",[71,185,186],{"class":73,"line":110},[71,187,188],{},"cipher /w:C                           :: securely wipe free space on C\n",[71,190,191],{"class":73,"line":116},[71,192,193],{},"robocopy source dest /E /R:1 /W:1    :: copy large files/folders (more reliable than xcopy)\n",[10,195,196,197,199,200,144],{},"For ",[25,198,53],{}," and disk topics see the disk troubleshooting articles; for shutdown see ",[140,201,203],{"href":202},"/post/54/","Windows Won't Shut Down",[14,205,207],{"id":206},"_4-processes-users-services-info","4. Processes, users, services, info",[63,209,211],{"className":65,"code":210,"language":31,"meta":67,"style":67},"tasklist                    :: list processes\ntaskkill /im name.exe /f    :: force-end a process\nnet user                    :: list accounts\nnet user username password /add   :: create an account (admin)\ngpupdate /force             :: refresh group policy\nsysteminfo                  :: system overview\n",[25,212,213,218,223,228,233,238],{"__ignoreMap":67},[71,214,215],{"class":73,"line":74},[71,216,217],{},"tasklist                    :: list processes\n",[71,219,220],{"class":73,"line":80},[71,221,222],{},"taskkill /im name.exe /f    :: force-end a process\n",[71,224,225],{"class":73,"line":86},[71,226,227],{},"net user                    :: list accounts\n",[71,229,230],{"class":73,"line":92},[71,231,232],{},"net user username password /add   :: create an account (admin)\n",[71,234,235],{"class":73,"line":98},[71,236,237],{},"gpupdate /force             :: refresh group policy\n",[71,239,240],{"class":73,"line":104},[71,241,242],{},"systeminfo                  :: system overview\n",[10,244,245,246,249,250,253,254,144],{},"For a clearer view of specs, use ",[25,247,248],{},"msinfo32"," or ",[25,251,252],{},"dxdiag","; see ",[140,255,257],{"href":256},"/post/16/","How to Check Your PC's Specs, Model and Serial Number",[14,259,261],{"id":260},"_5-run-commands-winr-cheat-sheet","5. Run commands (Win+R) cheat sheet",[10,263,264,265,267],{},"Type these in ",[25,266,27],{}," to jump straight to the tool.",[269,270,271,284],"table",{},[272,273,274],"thead",{},[275,276,277,281],"tr",{},[278,279,280],"th",{},"Command",[278,282,283],{},"Opens",[285,286,287,298,308,318,328,338,348,358,368,378,388,398,408,418,428,438,448,458,468,478,488,497,506,516,526,537,551,561,571,581],"tbody",{},[275,288,289,295],{},[290,291,292],"td",{},[25,293,294],{},"msconfig",[290,296,297],{},"System Configuration (startup/boot/services)",[275,299,300,305],{},[290,301,302],{},[25,303,304],{},"regedit",[290,306,307],{},"Registry Editor",[275,309,310,315],{},[290,311,312],{},[25,313,314],{},"services.msc",[290,316,317],{},"Services",[275,319,320,325],{},[290,321,322],{},[25,323,324],{},"gpedit.msc",[290,326,327],{},"Group Policy (Pro/Enterprise; Home has no such tool)",[275,329,330,335],{},[290,331,332],{},[25,333,334],{},"devmgmt.msc",[290,336,337],{},"Device Manager",[275,339,340,345],{},[290,341,342],{},[25,343,344],{},"diskmgmt.msc",[290,346,347],{},"Disk Management",[275,349,350,355],{},[290,351,352],{},[25,353,354],{},"compmgmt.msc",[290,356,357],{},"Computer Management (bundles the above)",[275,359,360,365],{},[290,361,362],{},[25,363,364],{},"eventvwr.msc",[290,366,367],{},"Event Viewer (great for troubleshooting)",[275,369,370,375],{},[290,371,372],{},[25,373,374],{},"taskschd.msc",[290,376,377],{},"Task Scheduler",[275,379,380,385],{},[290,381,382],{},[25,383,384],{},"perfmon.msc",[290,386,387],{},"Performance Monitor",[275,389,390,395],{},[290,391,392],{},[25,393,394],{},"control",[290,396,397],{},"Control Panel",[275,399,400,405],{},[290,401,402],{},[25,403,404],{},"appwiz.cpl",[290,406,407],{},"Programs and Features (uninstall)",[275,409,410,415],{},[290,411,412],{},[25,413,414],{},"sysdm.cpl",[290,416,417],{},"System Properties (remote/performance/advanced)",[275,419,420,425],{},[290,421,422],{},[25,423,424],{},"ncpa.cpl",[290,426,427],{},"Network Connections",[275,429,430,435],{},[290,431,432],{},[25,433,434],{},"firewall.cpl",[290,436,437],{},"Windows Firewall",[275,439,440,445],{},[290,441,442],{},[25,443,444],{},"desk.cpl",[290,446,447],{},"Display Settings",[275,449,450,455],{},[290,451,452],{},[25,453,454],{},"main.cpl",[290,456,457],{},"Mouse Properties",[275,459,460,465],{},[290,461,462],{},[25,463,464],{},"intl.cpl",[290,466,467],{},"Region and Language",[275,469,470,475],{},[290,471,472],{},[25,473,474],{},"timedate.cpl",[290,476,477],{},"Date and Time",[275,479,480,485],{},[290,481,482],{},[25,483,484],{},"powercfg.cpl",[290,486,487],{},"Power Options",[275,489,490,494],{},[290,491,492],{},[25,493,248],{},[290,495,496],{},"System Information",[275,498,499,503],{},[290,500,501],{},[25,502,252],{},[290,504,505],{},"DirectX Diagnostics",[275,507,508,513],{},[290,509,510],{},[25,511,512],{},"winver",[290,514,515],{},"Windows version number",[275,517,518,523],{},[290,519,520],{},[25,521,522],{},"explorer",[290,524,525],{},"open File Explorer",[275,527,528,534],{},[290,529,530,36,532],{},[25,531,31],{},[25,533,35],{},[290,535,536],{},"open the matching terminal",[275,538,539,544],{},[290,540,541],{},[25,542,543],{},"ms-settings:",[290,545,546,547,550],{},"open Windows 11 Settings (add a suffix like ",[25,548,549],{},"ms-settings:network",")",[275,552,553,558],{},[290,554,555],{},[25,556,557],{},"shell:startup",[290,559,560],{},"current user startup folder (for auto-start)",[275,562,563,568],{},[290,564,565],{},[25,566,567],{},"shell:sendto",[290,569,570],{},"right-click \"Send to\" menu",[275,572,573,578],{},[290,574,575],{},[25,576,577],{},"%temp%",[290,579,580],{},"temp folder",[275,582,583,587],{},[290,584,585],{},[25,586,144],{},[290,588,589],{},"open the current user folder",[14,591,593],{"id":592},"_6-common-powershell-stronger-than-cmd","6. Common PowerShell (stronger than cmd)",[63,595,598],{"className":596,"code":597,"language":35,"meta":67,"style":67},"language-powershell shiki shiki-themes github-light github-dark","Get-Process                         :: process list\nStop-Process -Name name -Force     :: end a process\nGet-AppxPackage                     :: list apps (pipe to uninstall)\nGet-NetIPAddress                   :: see IP\nTest-NetConnection domain          :: connectivity test\nwinget list / install / upgrade    :: manage software\nGet-ChildItem                      :: list a directory (like dir)\n",[25,599,600,605,610,615,620,625,630],{"__ignoreMap":67},[71,601,602],{"class":73,"line":74},[71,603,604],{},"Get-Process                         :: process list\n",[71,606,607],{"class":73,"line":80},[71,608,609],{},"Stop-Process -Name name -Force     :: end a process\n",[71,611,612],{"class":73,"line":86},[71,613,614],{},"Get-AppxPackage                     :: list apps (pipe to uninstall)\n",[71,616,617],{"class":73,"line":92},[71,618,619],{},"Get-NetIPAddress                   :: see IP\n",[71,621,622],{"class":73,"line":98},[71,623,624],{},"Test-NetConnection domain          :: connectivity test\n",[71,626,627],{"class":73,"line":104},[71,628,629],{},"winget list / install / upgrade    :: manage software\n",[71,631,632],{"class":73,"line":110},[71,633,634],{},"Get-ChildItem                      :: list a directory (like dir)\n",[14,636,638],{"id":637},"_7-beginner-pitfalls","7. Beginner pitfalls",[19,640,641,647,650,657],{},[22,642,643,644,144],{},"Paths with spaces need English quotes: ",[25,645,646],{},"\"C:\\Program Files\\App\\app.exe\"",[22,648,649],{},"Commands that change the system must run as administrator.",[22,651,652,653,656],{},"Paste in the terminal with ",[25,654,655],{},"Ctrl + Shift + V"," or right-click.",[22,658,659,660,50,663,50,666,669,670,672],{},"Do not copy commands you do not understand, especially ",[25,661,662],{},"format",[25,664,665],{},"del",[25,667,668],{},"rd /s /q",", and ",[25,671,56],{},"; they really do delete and format.",[14,674,676],{"id":675},"wrap-up","Wrap-up",[10,678,679,680,50,683,669,686,689,690,692,693,695,696,698],{},"For network issues start with ",[25,681,682],{},"ipconfig",[25,684,685],{},"ping",[25,687,688],{},"flushdns","; for system glitches use ",[25,691,49],{}," and ",[25,694,53],{},"; to jump to any tool, type its command from the table in ",[25,697,27],{},". Keep this as a cheat sheet, and most \"I can't find it in the UI\" settings are one line away.",[700,701,702],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":67,"searchDepth":80,"depth":80,"links":704},[705,706,707,708,709,710,711,712],{"id":16,"depth":80,"text":17},{"id":60,"depth":80,"text":61},{"id":147,"depth":80,"text":148},{"id":206,"depth":80,"text":207},{"id":260,"depth":80,"text":261},{"id":592,"depth":80,"text":593},{"id":637,"depth":80,"text":638},{"id":675,"depth":80,"text":676},"md",{},true,"/post/88",{"description":12},"post/88","E1ScaYuo1mgJGCOtHLRHyuysBcKll9x3am2l6b1pWH8",1794378304366]