Some useful commands for Windows

Windows is the most used operating system in the world because of its simple and attractive graphical user interface. You can do mostly anything via the graphical user interface in Windows. But it also has commands support because many of the things can be done in a much easier way by command prompt than the graphical interface. There are many tasks that are repeatable so for those types of tasks you can simply write the set of commands that will do the same task. If you want a quick way to launch programs, documents, settings, and other resources on your Windows OS you can use command prompt. Here is the list of some basic but useful commands for windows.

some basic commands for windows

To create a user with Command Prompt 

C:\Windows\system32>net user peanut peanut123 /add 

Here peanut is the user name & peanut123 is the password of the user

To Check Users 

C:\Windows\system32>net user

To check the details of user 

C:\Windows\system32>net user peanut

Here peanut is the name of the user

To change the password of a user 

C:\Windows\system32>net user peanut *

For automatically generate strong password of a user 

C:\Windows\system32>net user ABC /random

How to delete the user with command prompt

C:\Windows\system32>net user rahul /del

Do you Know: – How to Enable or Disable Hibernation in Windows

To see the user name who is login 

C:\Windows\system32>echo %username%

How to enable administrator user in windows using command prompt

C:\Windows\system32>net user administrator /active:yes

How to disable administrator user in windows 

C:\Windows\system32>net user administrator /active:no

How to Stop users from changing their own password 

C:\Windows\system32>net user manu manu123 /passwordchg:no

How to allow user to change their own password 

C:\Windows\system32>net user hawk hawk123 /passwordchg:yes 

Here hawk is user name and hawk123 is password

How to set user account expiry date according to your requirement 

C:\Windows\system32>net user peanut peanut123 /expires:mm/dd/yy

How to enable password of any window user with command prompt

C:\Windows\system32>net user peanut peanut123 /passwordreq:yes 

Here peanut123 is password of user peanut

How to disable password of any window user 

C:\Windows\system32>net user ABC ABC123 /passwordreq:no

How to know the last logged in time of a user in your windows with command prompt 

C:\Windows\system32>net user administrator | findstr /B /C:”Last logon”

How to set password expiry date 

C:\Windows\system32>net accounts /MAXPWAGE:25

After 25 days password will expire

Ever stuck in a situation where a familiar song is playing but you can’t remember its name then follow our guide to find that song by clicking on this link.

How to Lock a user account with cmd 

C:\Windows\system32>wmic useraccount where name=’ABC’ set disabled=true

How to Unlock a user account 

C:\Windows\system32>wmic useraccount where name=’satish’ set disabled=false

How to add a user (like ABC) in a group (like WINDOWS) 

C:\Windows\system32>net localgroup WINDOWS ABC /add

How to see list of users in a group 

C:\Windows\system32>net localgroup WINDOWS

How to delete user from the group 

C:\Windows\system32>net localgroup WINDOWS satish /delete

How to Find windows OS version from command line 

C:\Windows\system32>ver

How to know more information about window OS  using command prompt

C:\Windows\system32>systeminfo

THESE COMMANDS ARE USED FOR REGISTRY EDITOR ONLY

How to disable Remote desktop direct from command line 

reg add “HKEY_LOCAL_MACHINESYSTEM CurrentControlSetControlTerminal Server” /v fDenyTSConnections /t REG_DWORD /d 1 /f

How to enable Remote desktop direct from command line 

reg add “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server” /v fDenyTSConnections /t REG_DWORD /d 0 /f

How to change computer name from command line 

WMIC computersystem where caption=’currentname’ rename newname<br>for example –> wmic computersystem where caption=’HH-pc’ rename windows7-pc

How to Change windows wallpaper from command line 

 reg add “HKEY_CURRENT_USERControl PanelDesktop” /v Wallpaper /t REG_SZ /d wallpaper_path /f
for example –> to set the image E:photosimage1.jpg as the wallpaper we need to run the command as below.

# reg add “HKEY_CURRENT_USERControl PanelDesktop” /v Wallpaper /t REG_SZ /d E:photosimage1.bmp /f

How to Disable or Enable Windows Automatic updates from command line 

“HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionWindowsUpdateAuto Update” /v AUOptions /t REG_DWORD /d 1 /f

How to Enable or Enable Windows Automatic updates from command line 

“HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionWindowsUpdateAuto Update” /v AUOptions /t REG_DWORD /d 0 /f

How to Disable Automatic updates service

sc config wuauserv start= disabled

How to Stop Automatic updates service

net stop wuauserv

THAT’S IT

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: