Often time, I'm asked how to troubleshoot SMS client installation errors. First thing I would recommend is to check WMI by running wmidiag.vbs on the troubled computer, be sure to run it under admin context. The beauty of wmidiag is, it tells you how to fix the problem. Secondly, if WMI is fine, look through the installation or client logs.
Thursday, November 6, 2008
How to Troubleshoot SMS Client Install Errors
Posted by
Emmanuel
at
1:59 PM
0
comments
Links to this post
Categories: SMS Client, Troubleshooting, WMI
Tuesday, August 5, 2008
SMS SQL for Last Hardware Inventory
The following SQL Query will return last HW Inventory date for a specific computer. Code is based on the client health queries by Paul Thomsen.
-- Last hardware inventory
select Name0, LastHWScan as 'HW Inventory'
from v_R_System sys full join v_RA_System_SMSAssignedSites ass ON ass.resourceID=SYS.resourceID
full join v_GS_WORKSTATION_STATUS WS ON WS.resourceID=sys.resourceID
where client0=1
and Name0 = 'computername'
Posted by
Emmanuel
at
8:33 PM
0
comments
Links to this post
Categories: Health, Inventory, SMS, SMS Client
Friday, August 1, 2008
SMS SQL for Last Discovery
The following SQL Query will return last discovery date for a specific computer. Code is based on the client health queries by Paul Thomsen.
-- Last discovery date
select Name0, AgentTime as 'Discovery'
from v_R_System sys full join v_RA_System_SMSAssignedSites ass ON ass.resourceID=SYS.resourceID full join (select ResourceId, MAX(AgentTime) as AgentTime from v_AgentDiscoveries where agentname<>'SMS Discovery Data Manager' AND agentname not like '%!_AD!_System%' ESCAPE'!' group by ResourceId) disc on disc.resourceid=sys.resourceid
where client0=1 --and IsNULL(AgentTime,@NullVal)>@olddate
and Name0 = 'computername'
Posted by
Emmanuel
at
9:31 PM
0
comments
Links to this post
Categories: Discovery, Health, SMS, SMS Client
Thursday, July 24, 2008
VBScript to Set SMS Client Cache Location
Need to set the SMS Client Cache Location? Well it's pretty easy, here's a basic VBScript to help you get started. This will set the Advanced Clients Cache Location, just be careful to set it correctly. Test, Test, Test! I'd suggest an SMS Package with different cache locations passed via command line (in seperate programs) for maximum flexibility.
---- Begin VBScript ----
On Error Resume Next
Dim oUIResourceMgr
Dim oCache
Set oUIResourceMgr = CreateObject("UIResource.UIResourceMgr")
Set oCacheInfo = oUIResourceMgr.GetCacheInfo
' Set the new location, default is "C:\WINDOWS\system32\CCM\Cache"
oCacheInfo.Location = "C:\WINDOWS\system32\CCM\Cache"
'Return the error so SMS can report it
WScript.Quit(Err)
---- End VBScript ----
Posted by
Emmanuel
at
5:05 PM
0
comments
Links to this post
Categories: SMS, SMS Client, SMS Client Cache, VBScript
Wednesday, July 23, 2008
SMS SQL for Duplicate Collection Names
Recently, I've found many collections with duplicate names. The dupes can cause problems when managing those collections. I quickly created the following SQL to find the offending collections.
-- This SQL query will show collections with duplicate names.
Select parentCollectionID, ParentCollection.Name, v_Collection.CollectionID, v_Collection.Name from v_Collection
left outer join
v_CollectToSubCollect
on v_Collection.collectionid=v_CollectToSubCollect.subcollectionid
left outer join
v_Collection ParentCollection
on v_CollectToSubCollect.parentCollectionID = ParentCollection.collectionid
where v_Collection.Name in (Select Name from v_Collection Group By Name Having Count(*)>1)
Posted by
Emmanuel
at
9:49 PM
0
comments
Links to this post
Categories: Collection, SMS, SQL
Saturday, July 5, 2008
SMS 2003 Error 10035, What to Do
Error 10035, or Waiting for Content, seems to be one of the most frequent errors people encounter. Clients often generate this error even when they succeeed. When things go bad, it's important to understand how to troubleshoot error 10035, and know how to fix it.
How to troubleshoot 10035 Waiting for Content Errors
List of Status Message IDs
Posted by
Emmanuel
at
8:17 AM
0
comments
Links to this post
Categories: Errors, SMS, SMS Client, Status Messages, Troubleshooting
SMS SQL for Program Failed Run Time Exceeded 10070
To create a query or collection of SMS clients which return a status of 10070, or program failed due to the runtime being exceeded, use the following WQL (replace advertID with your advertisement ID):
select stat.*, ins.*, att1.*, att1.AttributeTime
from SMS_StatusMessageasstat left joinSMS_StatMsgInsStrings as ins on stat.RecordID = ins.RecordID left joinSMS_StatMsgAttributes as att1on stat.RecordID = att1.RecordID inner join SMS_StatMsgAttributes asatt2 onstat.RecordID =
att2.RecordID
where stat.ModuleName = "SMS Client" and stat.MessageID =10070 and att2.AttributeID = 401 and att2.AttributeValue = "advertID"
Posted by
Emmanuel
at
8:11 AM
0
comments
Links to this post
Categories: Collection, Errors, Query, SMS, Status Messages, WQL