Andrew
2010-04-27 15:37:02 UTC
I'm trying to find all users (and their SID's) who have logged onto a domain
workstation. Currently I'm using the WQL query:
ASSOCIATORS OF {Win32_ComputerSystem.Name='" + NBiosName + "'} WHERE
AssocClass=Win32_SystemUsers ResultClass=Win32_UserAccount
Role=GroupComponent ResultRole=PartComponent
On my computer I can see all the local and domain accounts that have at one
time or another logged on. On multiple remote computers I am only seeing
local profiles. Yet when I open up the WMI Object Browser and connect to the
remote machine I see all local and domain accounts listed under the
Win32_UserAccount container. Though the domain accounts are seen by the WMI
Object Browser, if I click on them I get a 'WMI: Not found' pop-up. Is there
perhaps a better way to obtain this information? If not, how do I fix this?
Any help is very much appreciated.
WMI Object Browser -
http://www.microsoft.com/downloads/details.aspx?familyid=6430f853-1120-48db-8cc5-f2abdc3ed314&displaylang=en
workstation. Currently I'm using the WQL query:
ASSOCIATORS OF {Win32_ComputerSystem.Name='" + NBiosName + "'} WHERE
AssocClass=Win32_SystemUsers ResultClass=Win32_UserAccount
Role=GroupComponent ResultRole=PartComponent
On my computer I can see all the local and domain accounts that have at one
time or another logged on. On multiple remote computers I am only seeing
local profiles. Yet when I open up the WMI Object Browser and connect to the
remote machine I see all local and domain accounts listed under the
Win32_UserAccount container. Though the domain accounts are seen by the WMI
Object Browser, if I click on them I get a 'WMI: Not found' pop-up. Is there
perhaps a better way to obtain this information? If not, how do I fix this?
Any help is very much appreciated.
WMI Object Browser -
http://www.microsoft.com/downloads/details.aspx?familyid=6430f853-1120-48db-8cc5-f2abdc3ed314&displaylang=en