Powerful Commands in Windows

Windows commands you can't live without.

Command 1:

How to Set Command Prompt to Run as Administrator by default?

Follow these steps:

  • Press the Windows Logo key and type in "CMD", then click on "Open File Location".
Step 1
  • Right-click on the Command Prompt shortcut and go to "Properties".
Step 2
  • In the "Shortcut" tab, click on "Advanced" and then check the box "Run as administrator".
Step 3

Now, every time you run the command prompt, it will default to administrator mode.

Command 2:

Below command will help you to hide all your top secrets, weired photos, the journal and everything.

Follow these steps:

  • Select all the items you want to hide and right click on the selected items and select Compress to ZIP file.
Step 1
  • and, then with the Copy command you can hide the zip folder inside any photo.
  • copy /b <specifyTheImage>+<zipped file> <newImageFile>
Step 2

That's it, we have hidden the items now. For normal person, it will be a photo but for you it's your top dark secrets.

  • To unzip or extract the hidden items inside a jpg, rename the JPG file and change it's extension to ".zip" and then with the help of WinRAR you can extract the files.
Step 3 Step 4

Command 3:

Hide folder and files using the command prompt.

  • Open Command prompt and run the below command:
  • attrib +h foldername
    Step 1
  • as soon as you press enter key by typing above command, the folder will be hidden.

  • Step 2
  • To unhide the folder, just change the plus (+) symbol to (-) in the command:
  • attrib -h foldername
    Step 3

Below is the syntax and switches that can be used along with the Attrib command.


 ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [+O | -O] [+I | -I] [+X | -X] [+P | -P] [+U | -U]

       [drive:][path][filename] [/S [/D]] [/L]


  +   Sets an attribute.

  -   Clears an attribute.

  R   Read-only file attribute.

  A   Archive file attribute.

  S   System file attribute.

  H   Hidden file attribute.

  O   Offline attribute.

  I   Not content indexed file attribute.

  X   No scrub file attribute.

  V   Integrity attribute.

  P   Pinned attribute.

  U   Unpinned attribute.

  B   SMR Blob attribute.

  [drive:][path][filename]

      Specifies a file or files for attrib to process.

  /S  Processes matching files in the current folder

      and all subfolders.

  /D  Processes folders as well.

  /L  Work on the attributes of the Symbolic Link versus

      the target of the Symbolic Link

Command 4:

Command to see the wifi-networks you've ever connected to

  • Run the below command to see the wifi-network profiles you've ever connected to:
  • netsh wlan show profile
    Step 1
  • The craziest thing is that, you can also the password of that wifi-network. Let's see how we can achieve this:
  • netsh wlan show profile "Wifi-Network-Name" key=clear
    Step 2

Command 5:

How to associates a path with a drive letter?

  • Run the below command to map the folder with drive:
  • subst driveLetter: "Folder path" 
    Step 1

    Step 1
  • Just type SUBST to display a list of current virtual drives.

  • Step 2
  • Run below command if you want to delete/remove substituted (virtual) drive.

  • subst /d driveLetter:
    Step 3 Step 3

Command 6:

See the weather updates using CMD.

  • Run the below command to check the weather condition of any specified location.
  • curl wttr.in/Location
    Step 1

Command 7:

Unshort the shorten URL.

  • Run the below command to check where the shorten URL is taking you to?
  • curl --head --location "ShorternURL" | findstr Location
    Step 1

Command 8:

how to Check the status of a website?

  • Run the below command to check if the website is up?
  • curl -Is https://techtinkererr.blogspot.com/
    Step 1

Command 9:

Create a QR code.

  • Run the below command:
  • curl qrenco.de/https://techtinkererr.blogspot.com/
    Step 1

Command 10:

How to fetch the definition of a word in dictionary?

  • Run the below command to fetch the definition of a word in dictionary using curl.
  • curl dict.org/d:Beautiful

    dict.org is the domain name of the server we're sending the request to. It hosts an online dictionary service that allows users to look up word definitions.

    The /d: indicates that we're making a dictionary lookup query.

    Step 1

Command 11:

How to open an app/website using command prompt?

  • Just run the below command followed by the name or web address you want to open:
  • start app/website

    see the below commands for example:

    start https://techtinkererr.blogspot.com/
    start notepad

Command 12:

How to delete temporary files using command prompt?

  • Just run the below command to free-up the space by deleting the temporary files.
  • del /q /f /s %temp%\*
    Step 1

    Here, /q means Quiet mode, do not ask if ok to delete on global wildcard

    /f means Force deleting of read-only files.

    /f means Delete specified files from all subdirectories.

Command 13:

How to identify potential energy-saving opportunities?

  • Just run the below command in an elevated command prompt to generate an energy efficiency report for your computer.
  • powercfg /energy
    Step 1

    Run the below command to open the generated report.

    start %windir%/System32/energy-report.html 

Command 14:

How to get the battery usage report?

  • Just run the below command in an elevated command prompt to generate a battery usage report on Windows systems.
  • powercfg /batteryreport
    Step 1

    Run the below command to open the generated report.

    start %windir%/System32/battery-report.html 
    Step 2

Command 15:

Genrate detailed report of your wireless network connection history?

  • Just run the below command:
  • netsh wlan show wlanreport
    Step 1

    Run the below command to open the generated report.

    start  C:\ProgramData\Microsoft\Windows\WlanReport\wlan-report-latest.html 
    Step 2

Command 16:

Turn on or off Windows Defender Firewall with just one command.

  • Just run the below command to turn it OFF.
  • netsh advfirewall set allprofiles state off
  • and run the below command to turn it ON.
  • netsh advfirewall set allprofiles state on

Comments

Popular posts from this blog

Public Key Infrasturcture (PKI) interview questions.

PowerShell for Beginners: Unleashing the Power of Automation