none
Get-WmiObject -Class Win32_Group Returns Nothing

    Question

  • On multiple servers running "Get-WmiObject -Class Win32_Group" returns the security groups for that server and any domain ones if the server is joined to the domain. I have ran this on Windows Server 2008, 2008 R2 and Windows Server 2012 and all works fine.

    On one specific Windows Server 2008 R2 Server it returns nothing. If I run "Get-WmiObject -Class Win32_Account" it returns user accounts, but the "Get-WmiObject -Class Win32_Group" returns nothing at all.

    Any ideas why a specific server would fail with this command.

    Liam

    Thursday, February 28, 2013 5:54 PM

Answers

  • Liam - I suggest you use your MVP award and raise a support issue. I can't say for sure, but you case does not sound like any kind of scripting issue. Support should be able to resolve your issue better than we can. Looking at the 5 servers under my desk - ALL work fine so I can not reproduce your scenario.

    Before troubleshooting this - what OS are you running, how was it installed (upgrade). Have you tried a upgrade reinstall (re-installing the OS over top of itself)? What does the event log say?If, for some reason, your CIM complete - is there actually a win32_group class in yoru repository. What happens when you try to use a WMI explorer and view the class?


    Thomas Lee <DoctorDNS@Gmail.Com>

    Thursday, February 28, 2013 11:57 PM

All replies

  • On multiple servers running "Get-WmiObject -Class Win32_Group" returns the security groups for that server and any domain ones if the server is joined to the domain. I have ran this on Windows Server 2008, 2008 R2 and Windows Server 2012 and all works fine.

    On one specific Windows Server 2008 R2 Server it returns nothing. If I run "Get-WmiObject -Class Win32_Account" it returns user accounts, but the "Get-WmiObject -Class Win32_Group" returns nothing at all.

    Any ideas why a specific server would fail with this command.

    Liam

    Sounds like a support question.  We cannot field supprt questions because you ned to do incremental troubleshooting which is not scripting.

    Verify that the server actually has groups that are viewable and that you are an administrator on that server.  If yes then reboot server as WMI canbecome corrupted or may fail if there is a pending reboot.  If yuo still have issues then open a ticket at http://support.microsoft.com


    ¯\_(ツ)_/¯

    Thursday, February 28, 2013 5:59 PM
  • Thanks, the server has groups as it is a domain controller and I can see the domain and built-in groups. I am also logged into the server as an Administrator. All other Win32_X commands work, except the Win32_Group and also Win32_GroupUser.

    I know it seems like a support question, however this is just a development environment which I have and have never seen this issue. It would just be nice to not have to rebuild the entire server just to get round the issue.

    I have already repaired the WMI and still the same error, and am just looking for anyone that may have seen this issue before.

    Liam

    Thursday, February 28, 2013 8:54 PM
  • You should still post this isn the server platform forum.  It is a support issue and not a scripting issue.

    You have already shown to yourself that it is a break-fix issue.   Support is the only place to llok.  Try searching the KB for articles.


    ¯\_(ツ)_/¯

    Thursday, February 28, 2013 9:26 PM
  • Liam - I suggest you use your MVP award and raise a support issue. I can't say for sure, but you case does not sound like any kind of scripting issue. Support should be able to resolve your issue better than we can. Looking at the 5 servers under my desk - ALL work fine so I can not reproduce your scenario.

    Before troubleshooting this - what OS are you running, how was it installed (upgrade). Have you tried a upgrade reinstall (re-installing the OS over top of itself)? What does the event log say?If, for some reason, your CIM complete - is there actually a win32_group class in yoru repository. What happens when you try to use a WMI explorer and view the class?


    Thomas Lee <DoctorDNS@Gmail.Com>

    Thursday, February 28, 2013 11:57 PM