Multiple User Object VariablesRSS

2 replies

Last post Feb 12, 2007 12:23 PM by Anonymous

  • Multiple User Object Variables

    Feb 12, 2007 08:12 AM|Anonymous|LINK

    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?

    ADS input format

  • Re: Multiple User Object Variables

    Feb 12, 2007 11:37 AM|Anonymous|LINK

    What is an example of a canonicalName you would and would not want to match the query?

    ADS input format

  • Re: Multiple User Object Variables

    Feb 12, 2007 12:23 PM|Anonymous|LINK

    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!

    ADS input format