≡ Menu

Do you want to Start/stop Windows service using Powershell? This post explains how to manage any Windows service with the help of the PowerShell cmdlets 'Start-Service', 'Stop-Service' and 'Restart-Service' Run the following steps to stop a Windows service Open powershell with admin privileges. You can do this by running 'powershell' command from elevated administrator command [...]

Do you want to add a domain group to local administrators group? We can do this from CMD using 'net localgroup' command. In corporate network, IT administrators would like to have ability to manage all Windows computers connected to the network. This can be accomplished by having an active directory group with all administrators domain accounts [...]

Robocopy command is used on Windows to copy files and directories from one location to another. This CMD command also prints a detailed report of the copy operation. Below you can find examples for using Robocopy in various usecases. Example: Copy all the files in the directory D:\dir1\data to E:\backup\data. Don't include sub directories or the files stored [...]

Windows CMD Commands

Generally the tech world sees Windows command line less powerful than what Linux's command line can do. However, there are still lots of things one can do with the native available Windows commands, as this website shows all such tricks with examples. With the addition of PowerShell, I don't think there is any limit for [...]

We can kill a process from GUI using Task manager. If you want to do the same from command line., then taskkill is the command you are looking for. This command has got options to kill a task/process either by using the process id or by the image file name. We can kill all the [...]

PowerShell : Reboot Windows

This post explains how to reboot Windows computer using PowerShell command prompt. Open PowerShell prompt by running powershell from cmd. Run the below command which reboots Windows without asking user for any confirmation. restart-computer If you want the user to confirm if reboot is required, then use -Confirm argument. restart-computer -Confirm Example Run: PS C:\> [...]

How to Install PowerShell Help Files

Learn how to install PowerShell help documents on your local computer and avoid looking up online. Open administrator command prompt Run powershell from cmd. Next you would see PowerShell prompt. Run the command(cmdlet) update-help. That's all you have to do. The command would do automated installation of all help files. After the installation completes,you can [...]

Find files with zero size

Do you want to find and delete all unwanted zero sized files, recursively from all subfolders? This post explains how to accomplish that with a one line CMD command. forfiles /S /M * /C "cmd /c if @fsize EQU 0 echo @path" If you just want to print the file name and do not need [...]

How to Shutdown Windows

With tiles and tablet kind of interface, new versions of Windows need command line shutdown more than their previous versions. This post explains how a Windows user can run shutdown from CMD. Additionally, if you have issued a shutdown command and then realize that you don't need it, you have a cancel option too. Moreover, this [...]

How to flush DNS cache

This post explains how to view / flush DNS cache on the local machine from command prompt. The DNS resolver cache stores the IP addresses for the websites recently visited from this computer. The cache entries can be retrieved using the below command. ipconfig /displaydns Example: C:\>ipconfig /displaydns Windows IP Configuration www.windows-commandline.com ---------------------------------------- Record Name [...]