cannot filter for empty company attribute

Welcome Forums General PowerShell Q&A cannot filter for empty company attribute

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 7 years, 2 months ago.

  • Author
  • #6239

    Points: 0
    Rank: Member

    by fgc at 2012-12-20 14:20:45

    I was trying to get all users with empty company attribute – like this:

    get-aduser -properties Company -filter {Company -eq $null} or:
    get-aduser -properties Company -filter {Company -eq "" }

    but none of these worked. I know that using the "where" statement will work,
    (get-aduser -filter * -properties * | where {$ -eq $null } ) , but I was trying to do it with the -filter expression.


    by mikefrobbins at 2012-12-20 16:43:57

    get-aduser -properties Company -filter {Company -notlike "*"}

    by fgc at 2012-12-20 23:08:09

    Great! – thanks a lot ... 🙂

The topic ‘cannot filter for empty company attribute’ is closed to new replies.

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