![]() |
![]() OCAU News - Wiki - QuickLinks - Pix - Sponsors |
|
|||||||
| Notices |
|
Sign up for a free OCAU account and this ad will go away! Search our forums with Google: |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Member
Join Date: Jan 2011
Posts: 234
|
Hey guys i am just looking for a way to clean out computers that have been inactive for 180days from SCCM.
I have tried a few different approaches that I googled but nothing seems to work for me. First I tried to make a collection with the following statement: Code:
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.UserAccountControl = "4098" Then I found a power shell script that is meant to delete disabled computers but I can't work out how to run that, i think that my issue is that my SCCM server and domain controller are separate. Link to script I have only just had SCCM dumped on me so could be missing something easy. I would like to remove the computers based on if they are disabled in AD rather than based on when there password changed.. Can someone help me? |
|
|
|
| Join OCAU to remove this ad! |
|
|
#2 |
|
Member
Join Date: Jan 2005
Location: Melbourne
Posts: 328
|
I haven't used SCCM, but this could be a good place to start.
http://trevorsullivan.net/2010/08/17...t-version-3-0/
__________________
NeOnServ 2.0: Ubuntu 12.04LTS | Q6600 | 8gb | G/A 8EP35-DS3P | AOC-USAS-L8i | 15x 2tb Samsung HD204UI (ZFS Raid-Z2) | CMStacker 810 |
|
|
|
|
|
#3 | |
|
Member
Join Date: Jan 2011
Posts: 234
|
Quote:
I really like the idea of the collection to show disabled accounts but can not work out why it is not populating anything.. If no one here can help maybe I will have to ask on the SCCM forums, but I thought this would be a simple process.. I guess I now know why there is so much information on the internet, must be a struggle for everyone not just the SCCM noobs.. |
|
|
|
|
|
|
#4 |
|
Member
Join Date: Jan 2002
Posts: 92
|
Im pretty sure SCCM has a site task specifically designed for this.
You can enable a predefined task under Site settings -> Site Maintenance -> tasks. It is called something like Delete obsolete client data. Open it, check to enable and set the wanted interval. Is that not working?
__________________
Lanvictims |
|
|
|
|
|
#5 |
|
Member
Join Date: Apr 2004
Location: The Isle of Despair
Posts: 76
|
Code:
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 Name in (select Name from SMS_R_System where ((DATEDIFF(day, SMS_R_SYSTEM.AgentTime, getdate()) >=15) and AgentName = "SMS_AD_SYSTEM_DISCOVERY_AGENT")) and Name in (select Name from SMS_R_System where ((DATEDIFF(day, SMS_R_SYSTEM.AgentTime, getdate()) >=45) and AgentName = "Heartbeat Discovery")) There are a series of site maintenance tasks that delete old data associated with clients, but I'm not sure any of them delete the clients themselves. I have all of the tasks enabled and scheduled to run daily or weekly, but I've never seen a client deleted automatically. |
|
|
|
![]() |
| Bookmarks |
|
Sign up for a free OCAU account and this ad will go away! |
| Thread Tools | |
|
|