Overclockers Australia Forums
OCAU News - Wiki - QuickLinks - Pix - Sponsors  

Go Back   Overclockers Australia Forums > Specific Hardware Topics > Business & Enterprise Computing

Notices


Sign up for a free OCAU account and this ad will go away!
Search our forums with Google:
Reply
 
Thread Tools
Old 12th July 2012, 10:54 AM   #1
UserInterface Thread Starter
Member
 
Join Date: Jan 2011
Posts: 234
Question Clean old computers from SCCM 2007

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"
But nothing shows up in the collection.

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?
UserInterface is offline   Reply With Quote

Join OCAU to remove this ad!
Old 12th July 2012, 1:42 PM   #2
BAK
Member
 
BAK's Avatar
 
Join Date: Jan 2005
Location: Melbourne
Posts: 328
Default

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
BAK is offline   Reply With Quote
Old 12th July 2012, 2:39 PM   #3
UserInterface Thread Starter
Member
 
Join Date: Jan 2011
Posts: 234
Default

Quote:
Originally Posted by BAK View Post
I haven't used SCCM, but this could be a good place to start.

http://trevorsullivan.net/2010/08/17...t-version-3-0/
Wow most of that is over my head but it does not look like it will work in my case. Our disabled accounts are spread through different OU's. I do not have the authority to change anything in AD as it is managed by corporate in the US. So i need to just find all the computers that are disabled where ever they are and then removed them based on this.

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..
UserInterface is offline   Reply With Quote
Old 19th July 2012, 12:50 PM   #4
0shooter0
Member
 
Join Date: Jan 2002
Posts: 92
Default

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
0shooter0 is offline   Reply With Quote
Old 19th July 2012, 3:06 PM   #5
Codestorm
Member
 
Codestorm's Avatar
 
Join Date: Apr 2004
Location: The Isle of Despair
Posts: 76
Default

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"))
We use this to populate a collection with clients that are no longer in AD and then manually delete them from SCCM.

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.
Codestorm is offline   Reply With Quote
Reply

Bookmarks

Sign up for a free OCAU account and this ad will go away!

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time now is 1:57 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. -
OCAU is not responsible for the content of individual messages posted by others.
Other content copyright Overclockers Australia.
OCAU is hosted by Internode!