views:

24

answers:

1

Using .Net how can I check which users in our domain have resources (files, shares) open on a remote Windows server?

If you have any C# examples I'd be grateful.

+2  A: 

I think you can do that using the WMI class Win32_ConnectionShare. This discussion has an answer with a simple C# sample that should get you started.

Edit: Just realised that the NetFileEnum API might be a better solution. If you look at the PInvoke page for it here, you can find a basic C# sample.

ho1
+1. Nice answer....
David Stratton