A batch file (batch script) in Windows is a text file that typically has a .bat extension and includes one or more command prompt commands. It is a good practice to comment a source code in a batch file by leaving the remarks that explain functionality of some lines or blocks of code. Also any […]
The process identifier (a.k.a. process ID or PID) is a number used to uniquely identify an active process. In this short note i will show how to display information about the Windows process (incl. the process name and path to an executable file) by PID from the command-line prompt (CMD) or a Windows PowerShell.
The touch command in Linux is used to change a file’s “Access“, “Modify” and “Change” timestamps to the current time and date, but if the file doesn’t exist, the touch command creates it. If you simply want to create an empty file from the command-line prompt (CMD) or a Windows PowerShell – the type and […]
Even though there is still no built-in Windows uptime command, the actual uptime of the server/workstation or the system boot time can be checked from the command-line. In this note i will show several methods of how to check Windows uptime from the command-line prompt and PowerShell.
Some scripts or commands executed in Windows PowerShell or CMD may ask interactive questions that have to be responded with “Yes” or “No” answers. To know how to answer these interactive questions automatically is very handy for different automations. In this note i will show how to respond “Yes” or “No” to prompts in Windows […]
Sometimes it is required to run an application as a different user. For example, you may want to run an elevated command prompt to execute some commands with administrative privileges. In Windows, an executable file can be run as a different user from the File Explorer or using the command line.
Windows Domain Controller (DC) is a server that responds to security authentication requests within a Windows Domain (group of networked computers controlled by domain controller). In this short note i will show how to find out which DC a computer is authenticated to using Windows CMD and PowerShell.
Windows Domain Controller (DC) is a server that responds to security authentication requests within a Windows Domain (group of networked computers controlled by domain controller). In this article i will show how to find out whatever a computer is a part of a Windows domain and how to get the name of the domain the […]
The elevated command prompt allows users to execute commands with administrative privileges. By default, when opening the command line in Windows, you will not have full rights and not all commands will work. In this short note i am showing the easiest and quickest way of how to run CMD as administrator. This method of […]
The cat command in Linux is used to concatenate files and print on the standard output. The type command is a Windows cat equivalent that works across a command-line prompt (CMD) and a Windows PowerShell. In this short note i will show how to concatenate files and how to print the contents of a text […]