Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Use Get-WMIObject to find Open Handles

1,095 views
Skip to first unread message

jmedd

unread,
Feb 11, 2009, 7:05:00 AM2/11/09
to
Anyone know if it is possible to use WMI to query the handles associated with
a process, i.e. in a similar way to the sysinternals 'handle' tool?

http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx

Win32_Process only gives you Total Number of Open Handles (Handlecount).

Thanks

jmedd

unread,
Feb 11, 2009, 7:09:00 AM2/11/09
to
Anyone know if it is possible to use WMI to query the file handles associated
with an open process in a similar way to the 'handle' tool from sysinternals?

http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx

Win32_Process only seems to offer the total number of open handles
(handlecount).

Thanks

Marco Shaw [MVP]

unread,
Feb 11, 2009, 7:38:34 AM2/11/09
to

Probably not, but some WMI answers can also depend on what exact OS (and
SP/release, etc) you are referring to...

Marco

--
*Microsoft MVP - Windows PowerShell
https://mvp.support.microsoft.com/profile/Marco.Shaw
*Co-Author - Sams Windows PowerShell Unleashed 2nd Edition
*PowerShell Co-Community Director - http://www.powershellcommunity.org
*Blog - http://marcoshaw.blogspot.com

jmedd

unread,
Feb 11, 2009, 7:54:01 AM2/11/09
to
OK, I thought that might be the case. Just in case the OS in question would
be Windows 2003 R2 SP1.

Marco Shaw [MVP]

unread,
Feb 11, 2009, 8:22:31 AM2/11/09
to
jmedd wrote:
> OK, I thought that might be the case. Just in case the OS in question would
> be Windows 2003 R2 SP1.

I don't have access to this OS, but if you can't find something relevant
on Server 2008 and/or Vista, then you won't likely find it in 2003.

I might recommend considering using WinRM and using handle.exe...

RichS [MVP]

unread,
Feb 11, 2009, 8:29:00 AM2/11/09
to
Can't see any specific WMI classes for dealing with handles either
--
Richard Siddaway
All scripts are supplied "as is" and with no warranty
PowerShell MVP
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk
0 new messages