1

The windows net use command output typically is:

C:\Users>net use
New connections will be remembered.


Status       Local     Remote                    Network

-------------------------------------------------------------------------------
OK           J:        \\nawak\ar                Microsoft Windows Network
Unavailable  K:        \\argh\bc                 Microsoft Windows Network
Disconnected L:        \\waytoolongpath\toolongreally
                                                Microsoft Windows Network
OK           M:        \\nawak\au                Microsoft Windows Network
The command completed successfully.

What are the possible values in the status column (with an english local), and what do they mean?

For instance, OK does not mean that the drive letter can be accessed, in my case J: is not accessible for me:

C:\Users>J:
Access is denied.

The command line help (net use -help) say nothing on that matter. The Microsoft documentation is silent too about it.

Nicolas D.
  • 11
  • 1
  • Is there a reason you believe there are more then three states other than (OK, Unavailable, and Disconnected)? – Ramhound Jan 12 '23 at 17:09
  • It would surely be nice to have those statuses precisely documented, but anyway, I guess you actually have another trouble to solve, which looks to be "how can I check a network share is usable from the command line?". It seems the `net use` command only checks the drive is connected, and so, you then have to do additional checks for knowing if you are allowed to enter it. – Frédéric Jan 13 '23 at 18:19
  • @Ramhound: no, but I want to know for sure. – Nicolas D. Jan 16 '23 at 08:25
  • @Frédéric: yes then no. I need to know all possible states to process them all correctly depending on their meaning. And for bad human reasons I have no way to get rid of I have to stick with net use, despite it is not at all appropriate to parse its output. – Nicolas D. Jan 16 '23 at 08:39

0 Answers0