Questions tagged [windows]

Windows is the brand name for a series of operating systems from Microsoft. Current versions are Windows 10, Windows 11, Windows Server 2016, Windows Server 2019, and Windows Server 2022. Instead of tagging a post "Windows", try to use a tag for a specific version.

Introduction

Windows is a family of operating systems developed by Microsoft. Originally a graphical add-on for Microsoft DOS, Windows is currently the market leader for operating systems on the desktop.

Today there are several branches of Windows:

  • Windows for desktops, notebooks, and tablets
  • Windows Server, for servers
  • Windows IoT, for embedded devices such as point of sale, kiosks, and signage

Tag recommendations

If your question is version-specific, consider using a version-specific tag.

17405 questions
634
votes
18 answers

How do you find what process is holding a file open in Windows?

One thing that annoys me no end about Windows is the old sharing violation error. Often you can't identify what's holding it open. Usually it's just an editor or explorer just pointing to a relevant directory but sometimes I've had to resort to…
cletus
  • 9,999
  • 9
  • 37
  • 40
555
votes
32 answers

How do I tell Git for Windows where to find my private RSA key?

My Git setup runs fine on Linux, but when I try to set things up under Windows (using Git for Windows and TortoiseGit), I don't know where to put my private SSH key (or, better still, how to tell ssh where it's located). I'm using the standard…
binaryorganic
  • 6,021
  • 4
  • 18
  • 19
334
votes
5 answers

How to send ctrl+alt+del using Remote Desktop?

How can I send ctrl+alt+del to a remote computer over Remote Desktop? For example, if I wanted to change the local admin password on a remote PC using a Remote Desktop connection, it would be helpful to be able to send the ctrl+alt+del key sequence…
T. Marshall
  • 3,443
  • 2
  • 17
  • 8
306
votes
14 answers

What's the command-line utility in Windows to do a reverse DNS look-up?

Is there a built-in command line tool that will do reverse DNS look-ups in Windows? I.e., something like w.x.y.z => mycomputername I've tried: nslookup: seems to be forward look-up only. host: doesn't exist dig: also doesn't exist. I…
280
votes
160 answers

Useful Command-line Commands on Windows

The aim for this Wiki is to promote using a command to open up commonly used applications without having to go through many mouse clicks - thus saving time on monitoring and troubleshooting Windows machines. Answer entries need to…
dance2die
  • 2,011
  • 7
  • 32
  • 41
224
votes
7 answers

How do you add a Windows environment variable without rebooting?

I would like to add an Environment variable to a Windows machine (desktop or server) and be able to use it without rebooting that machine. Say you have a production server which hosts a variety of apps and a new app needs a particular Environment…
Chad Braun-Duin
  • 2,259
  • 3
  • 15
  • 11
210
votes
13 answers

hosts file ignored, how to troubleshoot?

The hosts file on Windows computers is used to bind certain name strings to specific IP addresses to override other name resolution methods. Often, one decides to change the hosts file, and discovers that the changes refuse to take effect, or that…
Superbest
  • 5,265
  • 3
  • 15
  • 11
209
votes
10 answers

How to refresh hosts file without rebooting

On Windows, how do you refresh the hosts file without rebooting?
kakridge
195
votes
5 answers

How to sleep in a batch file?

How to pause execution for a while in a Windows batch file between a command and the next one?
Massimo
  • 70,200
  • 57
  • 200
  • 323
189
votes
9 answers

Resolve host name from IP address

I'm looking for a command line tool which gets an IP address and returns the host name, for Windows.
DouglasJose
  • 2,013
  • 2
  • 14
  • 7
168
votes
11 answers

Run a .bat file in a scheduled task without a window

I have a scheduled task that starts a batch script that runs robocopy every hour. Every time it runs a window pops up on the desktop with robocopy's output, which I don't really want to see. I managed to make the window appear minimized by making…
168
votes
5 answers

How to add dependency on a Windows Service AFTER the service is installed

I have a Windows Service that makes use of a SQL Server database. I don't have control over the installation of the service, but would like to add a dependency on the service to ensure that it starts after SQL server has started. (SQL server is…
Rick
  • 1,825
  • 2
  • 13
  • 6
163
votes
11 answers

How do I diff two text files in Windows Powershell?

I have two text files and want to find the differences between them using Windows Powershell. Is there something similar to the Unix diff tool available? Or is there another other way I haven't considered? I've tried compare-object, but got this…
Brian Willis
  • 3,619
  • 4
  • 21
  • 14
156
votes
12 answers

Is there a global, persistent CMD history?

Sometimes I forget how the exact syntax of a CMD command looks and then I would like to search my own CMD history. Clearly, within the same session, you can browse it with the up and down arrow keys but what about the history of former CMD sessions?…
raoulsson
  • 4,763
  • 10
  • 34
  • 29
154
votes
9 answers

Command line to list users in a Windows Active Directory group?

Is there a command line way to list all the users in a particular Active Directory group? I can see who is in the group by going to Manage Computer --> Local User / Groups --> Groups and double clicking the group. I just need a command line way to…
Flyer
1
2 3
99 100