Filtering users that don't have a property

This topic contains 2 replies, has 2 voices, and was last updated by  Steev182 1 year, 9 months ago.

  • Author
  • #54322


    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}


    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

    Daniel Krebs

    Please check if below works for you.

    Get-ADUSer -Filter { msRTCSIP-UserEnabled -notlike '*' }
    • #54324


      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.