Jump to content


  • 0
mbkowns

Remove computers not in AD from collection

Question

Is there a way I could remove computers not found in AD from a collection membership?

 

Using this to grab all systems

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 inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM.SystemRole = "Workstation")

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Is there a way I could remove computers not found in AD from a collection membership?

 

Using this to grab all systems

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 inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM.SystemRole = "Workstation")

 

if you want to remove the computers from SCCM databse which are not in AD ,you can do ths via site maintanance tasks (http://technet.microsoft.com/en-us/library/bb693646.aspx)

 

Or else look at this script : http://myitforum.com/cs2/blogs/matbe/archive/2011/05/03/delete-computers-from-sccm-that-have-been-removed-from-ad.aspx (use at your own Risk )

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.