Finding objects that match * or *

Home Forums Scripting PowerShell Finding objects that match * or *

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    Killerbe
    Member
    #156807

    How do i search on multiple parameters in Powershell?

    For example Lync. I want to search all users that have either sipaddress 1 or sipaddress 2?

    I tried following:
    Get-csuser | select-string -pattern “*Sipdomain 1”, “Sipdomain 2” | fl displayname, sipdomain

    Get-csuser | where {$_.sipdomain -like “*Sipdomain 1”} | where {$_.sipdomain -like “*Sipdomain 2”} | fl displayname, sipdomain

    And what do i use when i want to find objects that own multiple attributes
    example:

    Get-csaduser | where {$_Homeserver -eq “OCSServer}&{$_.Sipaddress -like “$SipDomain 1” | fl displayname, sipaddress, Homeserver

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.