I've created several collections based on the last logon time attribute, that 
would probably be better than last password set.

Try this:

select 
SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client
 from SMS_R_System where SMS_R_System.LastLogonTimestamp >= 
DateAdd(dd,-7,GetDate())

From: [email protected] [mailto:[email protected]] On 
Behalf Of Iacaruso, Mike
Sent: Wednesday, January 14, 2015 11:10 AM
To: [email protected]
Subject: [mssms] Create SCCM 2012 collection based on a SQL query

I need to use the AD attribute pwdLastSet in SCCM to filter out stale systems.  
I added the attribute to the AD system discovery, but I need to convert 
pwdlastset to a date readable  format.  I need to find systems that are older 
than 45 days.   I have found that I cannot convert this using WQL and have used 
SQL to convert this but I need to create a collection with these results.  I 
need this collection as part of a report for management.  Is there a way to 
create a collection using this SQL query?  Is there a better way to accomplish 
this?

Thanks


Mike Iacaruso
Enterprise Desktop Engineer
Office of Technology Services
Towson University
410-704-3965
[email protected]<mailto:[email protected]>



________________________________

CONFIDENTIALITY NOTICE: This email contains information from the sender that 
may be CONFIDENTIAL, LEGALLY PRIVILEGED, PROPRIETARY or otherwise protected 
from disclosure. This email is intended for use only by the person or entity to 
whom it is addressed. If you are not the intended recipient, any use, 
disclosure, copying, distribution, printing, or any action taken in reliance on 
the contents of this email, is strictly prohibited. If you received this email 
in error, please contact the sending party by reply email, delete the email 
from your computer system and shred any paper copies.

Note to Patients: There are a number of risks you should consider before using 
e-mail to communicate with us. See our Privacy & Security page on 
www.henryford.com for more detailed information as well as information 
concerning MyChart, our new patient portal. If you do not believe that our 
policy gives you the privacy and security protection you need, do not send 
e-mail or Internet communications to us.



Reply via email to