Get-CimInstance -ClassName Win32_Group -filter '"name=administrators"'

Welcome Forums General PowerShell Q&A Get-CimInstance -ClassName Win32_Group -filter '"name=administrators"'

This topic contains 2 replies, has 3 voices, and was last updated by

3 years, 5 months ago.

  • Author
  • #32433

    Topics: 16
    Replies: 9
    Points: 0
    Rank: Member

    hi all,

    this get-Ciminstance takes longer time to pull the data both from powershell.exe and ISE

    am running this cmdlet from local machine from which i required the data .

    operating system : windows 8.1 pro ;64-bit

    required help on this

  • #32437

    Topics: 9
    Replies: 2322
    Points: 0
    Rank: Member

    Is your computer joined to a domain? Win32_Group and similar classes enumerate both local and domain accounts / groups, so they can take a while.

  • #32439

    Topics: 0
    Replies: 13
    Points: 0
    Rank: Member

    If you specify that you are looking for a local group it goes much faster, like this:

    Get-CimInstance -Query "select * from win32_group where Domain='$env:COMPUTERNAME' and Name='Administrators'"

The topic ‘Get-CimInstance -ClassName Win32_Group -filter '"name=administrators"'’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort