Friday 2 December 2011

Old system still exist in SCCM console..

Solution to get Rid fo them .

1. Enable maintanance task to delete the system and check the log files smsdbmon.log to monitor the activity.

OR

2.  I suggest you create collection of computers you haven't heard from in x number of days, and use delete special to get rid of all the objects. below query will return all objects that haven't reported any hw inventory for a month.
Servers that haven’t scanned for hw inventory in 7 days or more:
select * from SMS_R_System inner join SMS_G_System_WORKSTATION_STATUS on SMS_G_System_WORKSTATION_STATUS.ResourceId = SMS_R_System.ResourceId where SMS_R_System.OperatingSystemNameandVersion like "%server%" and (DateDiff(day, SMS_G_System_WORKSTATION_STATUS.LastHardwareScan, GetDate()) >=30)

Any above option can be used to rid of old system that dosn,t exist anymore.

Cheers!!!!!

Move all your default collection using script!!!

Thanks to Richard for this excelent script for moving the collection.

Have you always been annoyed by the default collections cluttering up the view in your ConfigMgr console, well there’s a way that you can store them away under a separate collection. I found this blog post (http://verbalprocessor.com/2009/03/20/how-to-move-collections-in-configmgr) a while ago solving the problem. But hey I’m a lazy guy and after all, I’m installing lots of ConfigMgr servers out at customer sites, so automation is the key that drives lazy admins, right? So in this post I will walk you through using a script that can move collections based on either the name or comment of the collection/collections you want to move.

First up, you need to know some stuff from your environment, like the name of your server and site code. Also you need to know the Collection ID where you want to save the collection to. Start out by going to your ConfigMgr console and locate the site code, you will find it here:

 

Then create a new collection and localize the Collection ID, like this: 

 

Next up download the script (from the bottom of this post) and save it to an appropriate location on your site server, in this case I saved it to the location F:\UTV\Scripts. Then edit the section with site server (I run it on the ConfigMgr server so the name is set to ".") and site code plus the Collection ID of your newly created collection in the script. Also, in this case I will move the collection based on the name they have, so in the script I enter “All%”, which basically means all collections that starts with All… something.  
 
Start an elevated CMD prompt and run the script like below: 



Your output should look similar to this:



Finally refresh you console and your should end up like this:



Hope this help, you can also move collection based on comments just edit the beginning of the script something like this (based on the fact that you have collections with comment like Move).  




The script is here:

just rename it after putting it in notepad.

'
' Script created by: Richard Ulfvin
' http://www.filemilk.se/
'
' Disclaimer:
' This script is provided "AS IS" without express
' or implied warranty of any kind.
'
' Version 1.0
'

Option Explicit
Dim sConfigMgrServer : sConfigMgrServer   = "."
Dim sConfigMgrSiteCode : sConfigMgrSiteCode  = "C01"
Dim sCollectionName : sCollectionName    = ""
Dim sCollectionDesc : sCollectionDesc   = ""
Dim sParentCollectionID : sParentCollectionID  = ""
Dim oConfigMgr, sResult

ConnectToConfigMgr oConfigMgr
MoveCollection oConfigMgr, sCollectionName, sCollectionDesc, sParentCollectionID
Function ConnectToConfigMgr (oConfigMgr)
 'Attempts to use the provided information to connect to the ConfigMgr environment.
 Dim oWMILocator

 On Error Resume Next

 Set oWMILocator = CreateObject("WbemScripting.SWbemLocator")
 Set oConfigMgr = oWMILocator.ConnectServer(sConfigMgrServer, "root\sms\site_" & sConfigMgrSiteCode)

 If Err <> 0 Then
  sResult = "Error: " & Err.description
  Wscript.echo sResult
  Err.Clear
  Wscript.Quit(0)
 Else
  sResult = "Successfully connected to ConfigMgr"
  Wscript.echo sResult
 End If

 On Error Goto 0

End Function

Function MoveCollection(oConfigMgr, sCollectionName, sCollectionDesc, sParentCollectionID)
 Dim cCollections, oCollection, oCollectionRelation, sCollectionID, oCollectionLink, cCollectionLinks

 ' Obtain the collection ID of the collection.
 If sCollectionName <> "" Then
  Set cCollections = oConfigMgr.ExecQuery ("SELECT * FROM SMS_Collection where Name LIKE '" & sCollectionName & "'")
  Wscript.echo "Using Collection Name for parameter: " & sCollectionName
 ElseIf sCollectionDesc <> "" Then
  Set cCollections = oConfigMgr.ExecQuery ("SELECT * FROM SMS_Collection where Comment LIKE '" & sCollectionDesc & "'") 
  Wscript.echo "Using Collection Comment for parameter: " & sCollectionDesc 
 End If

 For each oCollection in cCollections
 
  sCollectionID=oCollection.CollectionID
  Wscript.echo "Found collection with name: " & oCollection.Name & " and CollectionID: " & oCollection.CollectionID
 
  ' Attempts to move the collection into the desired parent collection.
  Set oCollectionRelation = oConfigMgr.Get("SMS_CollectToSubCollect").SpawnInstance_()
  oCollectionRelation.parentCollectionID = sParentCollectionID
  oCollectionRelation.subCollectionID = sCollectionID
  oCollectionRelation.Put_
  Wscript.echo "Moving: " & oCollection.Name & " to rootcollectionID: " & sParentCollectionID
 
  'Delete any prior collectionlink.
  Set cCollectionLinks = oConfigMgr.ExecQuery ("SELECT * FROM SMS_CollectToSubCollect WHERE subCollectionID = '" & sCollectionID & "' AND NOT parentCollectionID = '" & sParentCollectionID & "'" ) 
  For each oCollectionLink in cCollectionLinks
   Wscript.echo "Found collection link for ID: " & oCollectionLink.subCollectionID & " with parrent collectionID: " & oCollectionLink.parentCollectionID & " to delete!"
   oCollectionLink.Delete_
  Next
 
 Next

End Function


Cheers!!!!!!

Thursday 1 December 2011

Remote Tools continues to become disabled even if after setting is to enable it on SCCM server.

Senario :

On some ofmy clients remote control was disable where as on site wise base it is kept to be enabled. When i tryied to take remote of one of my client machine . it gave me error remote control is disabled. Even after reinstalling the client the problem was same. it was getting disabled automatically.

Solution :

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Client\Client Components\Remote Control]
"Enabled"=dword:00000001

All my affected machines were still set to 0. This edit is done on the client machines.

Hope this will help!!

Cheers!!!!!

Collection take long time to refresh???

Cause :

A long delay occurs when you click "Refresh" to view the latest membership in a dynamic collection on a System Center Configuration Manager 2007 SP2 site server !!

Reason :
This issue occurs because Collection Evaluator maintains a first-in, first-out (FIFO) queue to handle the collection evaluation requests.

When you click Refresh to view the latest membership of a collection, this request is put at the end of a FIFO queue. If the number of previous requests is very large, Collection Evaluator requires a long time to complete the previous requests. Therefore, a long delay occurs before you view the updated results in the Configuration Manager console.

Solution :

Install SCCM2007-SP2-KB982400-ENU.msi KB.

Pre-Req :
To apply this hotfix, you must have System Center Configuration Manager 2007 Service Pack 2 (SP2) installed.

Cheers!!!! 

Certificates causing registration errors in client files while registering!!!

Senario :

I had a new issue today regarding clients not registering with their MP. The errors I received are below:

ClientIDManagerStartup.log
RegTask: Server rejected registration request: 3

PolicyEvaluator.log
Failed to trigger Machine settings update (80070057)

MP_RegistrationManager.log
Certificate issued to ‘SMS’ has expired.

After seeing the last error stating the certificate had expired I decided to delete the SMS certificates and repair the client. I did this by opening up the MMC and selecting the “Certificates” snapin for the machine with the issue. Once selected, drill down to SMS > Certificates and delete both SMS certificates.



Now all you need to do is repair the SCCM client and it should register correctly with the MP.

Cheers!!!!

SMSCFG.INI missing from client

Q. I was facing one problem in my environment, that I was not able to run the task sequence. I found that SMS Unique Identifier GUID is missing from the SMSCFG.INI file from the client machine. When I add GUID manually Task sequence starts on those client. I was not sure how GUID is missing from all the machine. After long search and communication with IT geeks finally i found the solution.


Soultion :


I found there is a scheduled task running which is deleting files including SMSCFG.ini but sccm client create the file again with less info.

Alternative solution is to repairing the client? or Reinstall it again but this should be last step :)

Cheer!!!!!!!!!!