Filtering users that don't have a property

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Steev182 Steev182 2 months, 2 weeks ago.

  • Author
    Posts
  • #54322
    Profile photo of Steev182
    Steev182
    Participant

    I'd like to be able to get all of the users that don't have an msRTCSIP-UserEnabled property at all in their AD account.

    I've tried to do

    get-aduser -filter {msRTCSIP-Enabled -eq $false}

    and

    get-aduser -filter {msRTCSIP-Enabled -ne $true}

    , but I get nothing. I also tried

    get-aduser -filter {msRTCSIP-Enabled -eq $true}

    and I do get results.

    When I check a user without SIP enabled, I find that they don't even have the msRTCSIP-UserEnabled property. That makes me wonder, is there a way to filter for users that don't have a specific attribute/property?

  • #54323
    Profile photo of Daniel Krebs
    Daniel Krebs
    Participant

    Please check if below works for you.

    Get-ADUSer -Filter { msRTCSIP-UserEnabled -notlike '*' }
    
    • #54324
      Profile photo of Steev182
      Steev182
      Participant

      Daniel, that does it perfectly, can't believe I didn't think of it.

      Thanks so much!

You must be logged in to reply to this topic.