Saturday, September 29, 2007

SMS WQL for All Clients where Last Status is Time Exceeded

select sys.ResourceID,sys.ResourceType,sys.Name,sys.SMSUniqueIdentifier,sys.ResourceDomainORWorkgroup,sys.Client from SMS_R_System as sys join SMS_ClientAdvertisementStatus as stat on sys.ResourceID=stat.ResourceID
where stat.AdvertisementID='advertisementID' and stat.LastStatusMessageID=10070

10070 is Time Exceeded, replace advertisementID with your advertisement ID.

SMS Status Message IDs

10050 Cache too small
10061 Download failed (retrying)
10003 Failed (bad environment)
0 No messages have been received
10054 Not enough space in cache
10045 Not enough space in cache
10034 Program cancelled by user
10022 Program completed successfully (reboot pending)
10009 Program completed with success
10008 Program completed with success
10004 Program failed
10007 Program failed
10006 Program failed
10057 Program failed (download failed - content mismatch)
10053 Program failed (download failed)
10058 Program failed (download/location failure)
10051 Program failed (no content)
10071 Program failed (retrying)
10072 Program failed (retrying)
10056 Program failed (retrying)
10070 Program failed (run time exceeded)
10021 Program failed (unexpected restart)
65535 Program received - no further status
10062 Program retrying (download/location failure)
10060 Program retrying (no content)
10005 Program started
10040 Program will not rerun
10055 Retry (Bad environment)
10037 Waiting for another program
10035 Waiting for content
10036 Waiting for user condition

Thursday, September 6, 2007

Potential Bug with Delete Programs Wizard?

It appears there may be a bug with the SMS 2003 SP2 Delete Programs Wizard. When deleting a program, the wizard shows you advertisements which have the same program name as the program you are deleting, regardless of the package name, or dependancies, etc.

Here's the test:

  1. Build two packages with the same program name
  2. Advertise both programs
  3. Delete one of the programs

Do both advertisements show in the wizard?

Do both get advertisements get deleted?

Only the correct advertisement is deleted, however the wizard can be misleading.

Wednesday, September 5, 2007

Removing the SMS Clients two minute wait for Policy Processing

Removing the SMS Clients two minute wait for Policy Processing is often needed in your test, packaging, or development environments. Recently one of our developers indicated that 2 minutes adds up to a lot of waiting during test cycles. Considering a lot can happen in "two minutes" I remembered finding something about this very issue.

On the 1e blog, Phil Wilcock outlines a process developed by Simon Burbidge from IE came up with. Basically, you modify the client with a mof which removes the 2 minute wait. Now your agent service will be able to process policy without waiting 2 minutes. Keep in mind, this is not a change for your entire infrastructure, but only in those rare cases you need to compress time a little and remove the SMS Clients two minute wait. Hey, in some cases 2 minutes can be a lifetime! :)

Here's the process:
1. Open notepad (or your favorite text editor).
2. Create a text file called setwait.mof.
3. Select the text below, and past into your setwait.mof file.

#pragma namespace("\\\\.\\root\\ccm\\policy\\machine\\Requestedconfig")
instance of CCM_PolicyAgent_Configuration
{
PolicySource = "Local";
PolicyDownloadMethod = "BITS";
PolicyEnableUserGroupSupport = true;
PolicyRequestAssignmentTimeout = 65;
PolicyTimeUntilAck = 43200;
PolicyTimeUntilExpire = 86400;
AuthorityName = "SMS:xxx";
PolicyTimeUntilUpdateActualConfig = 0;
};

4. Find the site code "SMS:xxx".
5. Replace "xxx" with your site code.
6. Run the command "mofcomp.exe setwait.mof" to compile the MOF on your SMS client.
7. Restart your SMS Agent Host service

Thanks to the guys at 1e, you should now have removed the SMS Clients 2 minute wait for policy processing. Oh, be sure to test this before applying to any production computers!