Need help create a fixlet for local user account inacltive 360 days

(imported topic written by tmichel91)

I need a way to create a fixlet who will show all windows 2003 machines who has an inactive account for > 90 * day delete. can anyone please help?

(imported comment written by NoahSalzman)

q: (last logons of it, logon count of it, names of it) of local users

A: ( Mon, 13 Jul 2009 21:53:58 -0700 ), 1, Administrator

A: ( Wed, 28 Jul 2010 10:31:52 -0700 ), 440, Noah Salzman

q: (logon counts of it, names of it) of local users

A: 1, Administrator

A: 0, Guest

A: 440, Noah Salzman

(note that Guest doesn’t show up in the first query because “last logon” has no result)

q: (last logons of it, logon count of it, names of it) of local users whose (last logon of it > now - 90*day)

A: ( Wed, 28 Jul 2010 10:31:52 -0700 ), 440, Noah Salzman

q: (last logons of it, logon count of it, names of it) of local users whose (last logon of it < now - 90*day)

A: ( Mon, 13 Jul 2009 21:53:58 -0700 ), 1, Administrator

(imported comment written by blibbons91)

Is there a way to include accounts in the first query even if they don’t have a “last logon” value?

q: (last logons of it, logon count of it, names of it) of local users

A: ( Mon, 13 Jul 2009 21:53:58 -0700 ), 1, Administrator

A: ( Wed, 28 Jul 2010 10:31:52 -0700 ), 440, Noah Salzman

I’m still learning the language and can’t get it to work, but using the above query would be possible to put in an if/then statement?

q: (if (exists last logons of it) then last logons of it else “No Logon”, logon count of it, names of it) of local users

(imported comment written by Bill.Ehardt)

Close… try this?

((if exists last logons of it then last logons of it as string else “No Logon”), logon count of it, names of it) of local users

(imported comment written by NoahSalzman)

In version 8.0 and up you can simplify that “if exists” syntax a tiny bit:

((last logon of it as string | “No Logon”), logon count of it, names of it) of local users