Enumerate Drive letters on remote computer and freespace on HD

  • Thread starter Thread starter Miguel Pires
  • Start date Start date
M

Miguel Pires

Hi,

Any one knows a way to get Hard Drive letters and free space (C: / D: ....) from a remote computer?

I'm developing one application that needs to know if a second drive exist on that system and i need to know the free space from the root drive and from the second drive in case of exist.
This application will run from a DC that has admin rights on remote computers.

I’m using VB.net not C# if some one cold point me to one example or give me one I appreciate.

I have google a lot and didn’t find anything like what I need.

Regards,


EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
Hi,

Any one knows a way to get Hard Drive letters and free space (C: / D: ....) from a remote computer?

I'm developing one application that needs to know if a second drive exist on that system and i need to know the free space from the root drive and from the second drive in case of exist.
This application will run from a DC that has admin rights on remote computers.

I’m using VB.net not C# if some one cold point me to one example or give me one I appreciate.

I have google a lot and didn’t find anything like what I need.

Regards,


EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

See the System.Management namespace in your MSDN help.

You need to get a collection of Win32_LogicalDisk objects. From the
first help page in MSDN, it looks like you need to populate a
ManagementObjectCollection.

Be aware though, there are likely to be security restrictions in place
to stop you doing this sort of thing against a remote computer unless
you are an administrator.

More info online:

http://msdn2.microsoft.com/en-us/library/ms257340.aspx
 
Back
Top