« Previous Next »

Thread: Multiple User Object Variables

Last post 02-12-2007 12:23 PM by LogParser User : sa07. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 02-12-2007, 8:12 AM

    Multiple User Object Variables

    Hello all,

        Trying to get logparser to query both an "=" and an IS NOT and I'm having a problem. Here is the base Query (which works well):

     

    LogParser "SELECT name, userPrincipalName, userAccountControl, canonicalName INTO \\somecomputer\reports\userreport.csv FROM 'LDAP://dc.domain.blah.xyz/ou=something,ou=something,dc=something,dc=something,dc=something,dc=something' WHERE userAccountControl = 512" -i:ADS -objClass:user -o:CSV

     

    I want to include something like "WHERE canonicalName IS NOT */*/variable/*

     

    Any ideas?

  • 02-12-2007, 11:37 AM In reply to

    RE: Multiple User Object Variables

    What is an example of a canonicalName you would and would not want to match the query?
  • 02-12-2007, 12:23 PM In reply to

    RE: Multiple User Object Variables

    Got it, I was using the wrong operators and like a dummy, the * as a wildcard instead of %. Here is the Query:

     

    LogParser "SELECT name, userPrincipalName, userAccountControl, canonicalName INTO \\somemachine\reports\test4.csv FROM 'LDAP://domaincontroller.domain.re.xyz/ou=something,ou=something,dc=something,dc=something,dc=something,dc=something' WHERE canonicalName NOT LIKE '%/something/%'AND canonicalName NOT LIKE '%/something/%' AND userAccountControl = 512" -i:ADS -objClass:user -o:CSV

     

    WORKS PERFECTLY!

Page 1 of 1 (3 items)
Microsoft Communities