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.
While troubleshooting an issue that causes an unexpected reboot or shutdown of a Windows machine, it is important to know which event IDs are related to system reboot/shutdown and how to find the appropriate logs. In this note i am publishing all the event IDs related to reboots/shutdowns. I am also showing how to display […]
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 […]
For better readability it is convenient to split long commands over multiple lines. In Windows PowerShell a multi-line command can be created from a long command by splitting it using the backquote character. In this note i will show an example of how to split a long command over multiple lines in PowerShell.
The Get-History command in PowerShell lists only the commands entered during the current session. To get the list of all previously executed commands it is required to locate the file where these commands are stored. In this note i will show how to locate the history file and list all commands executed previously in PowerShell.
During troubleshooting of different issues it is often required to check if some TCP port on a remote host is opened and ensure that it is not blocked by a firewall. The most common tool for this is telnet, but it may not be installed or you may want to be able to copy the […]
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 […]
Corporate Windows computers and servers are usually configured to lock the screen after some time of inactivity. This is especially inconvenient when your remote desktop session keeps disconnecting with “RDP Session Timeout” each time after few minutes of being idle. In this article i will show how to stop computer from locking and keep the […]
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 […]