August 2008 - Posts

Bernard White's SMS Server Tools for SMS2003

I stumbled across this posting.  Sounds very interesting, I've repeated some of the contents of that post here:

PACKAGE CONTENTS:

This release includes 7 command-line tools:

1. Management Point Ping Tool (MPPing.exe)
This tool provides basic diagnostics of Management Point status. Targets Management Points are tested by initiating a MPLIST and MPCERT. Although this can be done manually, this MPPing makes it very easy.

2. Site Information Tool (SiteInfo.exe)
Displays site information for a specified site; including site boundaries, site addresses, inbox item counts, type 2 site control serial numbers, client push installation accounts.

3. Package Information Tool (PkgInfo.exe)
Displays package information for a specified package; including package size, distribution point status, programs including dependencies and advertisements linked to each package program.

4. Distribution Point Mod Tool (DPMod.exe)
DPMod allows addition and removal of packages to distribution points. Also allows you to mirror a distribution point from an existing distribution point (useful for new distribution points).

5. Site Control File Check Tool (SCFCheck.exe)
Displays Site Control File serials for each site in the hierarchy. This tool can be used to quickly identify type 2 flagged Site Control Files for all sites in the hierarchy.

6. Site Services Tool (SiteSvc.exe)
Controls SMS services and threads remotely using the command-line. Allowing you to stop, start and restart threads that are inaccessible through the Services MMC.

7. Collection Membership Tool (CMember.exe)
Add direct membership to a collection for system, user and group resources. Names of resources can be specified, imported from a list or a regular expression.

Posted by skissinger | 2 comment(s)
Filed under:

Mof extension to get Physical Hard Drive Serial Number

In either ConfigMgr or SMS, add this mof snippet to sms_def.mof in inboxes\clifiles.src\hinv on your primary sites.  Note for the SMS2003 admins: no mofcomp'ing required on your clients; this is a server-side only edit.

[ SMS_Report     (TRUE),
  SMS_Group_Name ("Physical Media"),
  SMS_Class_ID   ("CUSTOM|PHYSICAL_MEDIA|1.0") ]

class Win32_PhysicalMedia : SMS_Class_Template
{
    [SMS_Report (TRUE)     ]        string     SerialNumber;
    [SMS_Report (TRUE), key]        string     Tag;
};

Sample Report; remember to add the prompt for ComputerName

select distinct sys.netbios_name0, dsk.Model0,
Phys.Tag0, Phys.SerialNumber0 from v_gs_physical_media0 as Phys
inner join v_r_system as sys on sys.resourceid=phys.resourceid
inner join v_gs_disk as dsk on Phys.resourceid=dsk.resourceid
where
sys.netbios_name0 = @ComputerName
and dsk.deviceid0=Phys.tag0
order by Phys.tag0 

ResourceExplorerSample, ReportSample

Posted by skissinger | with no comments

Hardware Inventory Action missing on ConfigMgr Client

Other than the obvious (you didn't enable Hardware Inventory in the console, Client Agents), if on your client the Hardware Inventory action is missing, the issue may be a misconfigured hardware inventory MOF file, configuration.mof, on your primary site.

I've had this happen twice in the lab, the first time I didn't write down what I did to fix it, but this second time--which took me just as long or longer to find the problem--I'm writing it down!

Although it's possible I haven't found other mis-configurations that would result in HW Inv policy causing the client to simply disable the policy completely, in this case the problem was in my additional MOF snippet, in configuration.mof, I was looking for specific regkeys.  When you do that, there is the top section which sets up what the values are going to be, and the bottom section tells the client where to go get those values in HKLM.

For example (Note; grabbed this sample from the ConfigMgr MOF snippets at sccmexpert.com, just using them as an example--and I've deliberately messed it up to illustrate the example):

[DYNPROPS]
Class Norton_Symantec
{
  [key] string  Component;
        string  NavPath;
        string  NavParent;
        string  NavPatternName;
        string  LicenseNumber;
        uint32  ParentPattern;
        uint32  PatternFileRevision;
        uint32  PatternFileSequence;
        uint32  ProductVersion;
        string  ScanEngineVendor;
        uint32  ScanEngineVersion;
        uint32  UsingPattern;
        string  VirusEngine;
        string  Nav7SAV8Defs;
        string  DefWatch10;
};

//`'`*._.*`'`*-
//  Instance of Extended_Norton_Symantec_Anti-Virus
//`'`*._.*`'`*-

[DYNPROPS]
instance of Norton_Symantec

{
  Component = "Norton/Symantec AntiVirus Definition File Data";
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Symantec\\InstalledApps|NAVNT"),Dynamic,Provider("RegPropProv")] NavPath;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Intel\\LANDesk\\VirusProtect6\\CurrentVersion|Parent"),Dynamic,Provider("RegPropProv")] NavParent;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Intel\\LANDesk\\VirusProtect6\\CurrentVersion|CurrentPatternName"),Dynamic,Provider("RegPropProv")] NavPatternName;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Intel\\LANDesk\\VirusProtect6\\CurrentVersion|LicenseNumber"),Dynamic,Provider("RegPropProv")] LicenseNumber;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Intel\\LANDesk\\VirusProtect6\\CurrentVersion|ParentPattern"),Dynamic,Provider("RegPropProv")] ParentPattern;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Intel\\LANDesk\\VirusProtect6\\CurrentVersion|PatternFileRevision"),Dynamic,Provider("RegPropProv")] PatternFileRevision;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Intel\\LANDesk\\VirusProtect6\\CurrentVersion|PatternFileSequence"),Dynamic,Provider("RegPropProv")] PatternFileSequence;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Intel\\LANDesk\\VirusProtect6\\CurrentVersion|ProductVersion"),Dynamic,Provider("RegPropProv")] ProductVersion;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Intel\\LANDesk\\VirusProtect6\\CurrentVersion|ScanEngineVendor"),Dynamic,Provider("RegPropProv")] ScanEngineVendor;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Intel\\LANDesk\\VirusProtect6\\CurrentVersion|ScanEngineVersion"),Dynamic,Provider("RegPropProv")] ScanEngineVersion;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Intel\\LANDesk\\VirusProtect6\\CurrentVersion|UsingPattern"),Dynamic,Provider("RegPropProv")] UsingPattern;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Intel\\LANDesk\\VirusProtect6\\CurrentVersion|VirusEngine"),Dynamic,Provider("RegPropProv")] VirusEngine;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Symantec\\SharedDefs|NAVNT_50_AP1"),Dynamic,Provider("RegPropProv")] Nav5Defs;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Symantec\\SharedDefs|NAVCORP_70"),Dynamic,Provider("RegPropProv")] Nav7SAV8Defs;
  [PropertyContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Symantec\\SharedDefs|DEFWATCH_10"),Dynamic,Provider("RegPropProv")] DefWatch10;
};

Looks fine, right?  What could be wrong with that?! After way too much time looking and looking at the lab sample, I finally spotted it.  The bottom, the Instance section, is looking for Nav5Defs.  But in the top section, I neglected to put in a string Nav5Defs.  Fixed that, drop the configuration.mof into the inboxes\clifiles.src\hinv, watch dataldr.log to be sure it's not rejected, a couple of policy refreshes on the client; and about 5 minutes later the Hardware Inventory action came back.

 Update: Chris Stauffer experienced a similar issue (hinv missing), but with a different cause.

Posted by skissinger | with no comments
Filed under: ,

How to gather Monitor Information like Serial Number

I see this question arise often enough in the forum. I thought I'd blog what I think I know so I can just point people here instead of retyping!

Before we get to serial number, if the information you are looking for are the Monitor's Manufacturer, or the pixels set (1024x768) that is an existing class in sms_def.mof.  Out of the box, those details are on by default.

If for asset tracking reasons you are asked to find monitors by serial number (although sometimes a college student with a clipboard for minimum wage might work just as well!) there are 4 methods I know of.  If there are others, I apologize.

In no particular order:

The top 3 are for-pay; just contact each vendor for a demo.  The last one is a script -- recently written -- that may do a better job than the previously available monsernum.vbs script.  (monsernum.vbs was questionable in my environment)  If you decide to go forward with the free one, remember you get what you pay for.  It hasn't been thoroughly tested, where the top 3 have been around for years.

Posted by skissinger | with no comments
Filed under: ,

Script to set ConfigMgr Client's 'Install required updates on a schedule'

This came out of the SDK:

on error resume next
'From ConfigMgr07 SDK
'Parameters:
'First parameter is the day
'0=none, 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday
'5=Thursday, 6=Friday, 7=Saturday, 8=Daily
'2nd Paramter is the time, 0 through 23
newRecurrence = wscript.arguments(0)
newHour = wscript.arguments(1)
set updatesDeployment = CreateObject ("UDA.CCMUpdatesDeployment")
updatesDeployment.SetUserDefinedSchedule newRecurrence, newHour
wscript.quit

As examples, NameOfTheScript.vbs 8 03 would be Daily, 3 am.  NameOfTheScript.vbs 7 23 would be Saturdays, 11 p.m.  If you need to disable the schedule, it's NameOftheScript.vbs 0

If you look at a client, their local Configuration Management applet, on the Updates tab an individual could set a schedule.  This script allows you to set that schedule via a vbscript advertisement.  I'm hoping (still haven't sent this to production yet, so YMMV) that by implementing this script I can appease the conflicting requirements of allowing for long periods before Software Updates are required, yet set installation times for different computers based on roles and get to 97% hotfix deployment quickly.

Posted by skissinger | with no comments