The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,682 other followers

Archive for December 3rd, 2012

Commandline equivalents for FsMgmt.msc: net share / net view / net session / net file / net use

Posted by jpluimers on 2012/12/03

For viewing shares, sessions and open files, you can use the FsMgmt.msc management console plugin (on the same page, Petri also has some interesting information on the NTLANUI.DLL)

You can do the same from the command line, using the NET command.

Somehow, can remember the NET SHARE and NET SESSION command, but I always forget about the NET FILE command.

Luckily, SS64 has documentation on the NET SHARE/VIEW/SESSION/FILE/USE commands on one page.

Here is what they have on NET FILE:

Display all the open shared files on a server and the lock-id

NET FILE

Close a shared file (disconnect other users and remove file locks)

NET FILE id /CLOSE

Two tiny notes:

  • for NET FILE and NET SHARE you need to be Administrator (and run them from an elevated command prompt when running on Windows Vista and up).
  • you can pluralize these commands as well:
    – NET SHARES
    – NET SESSIONS
    – NET FILES
    They work just like the singular version.
    NET USES and NET VIEWS won’t work though.

–jeroen

via: net share / net view / net session / net file / net use.

Posted in Power User, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

 
%d bloggers like this: