Enable DCOM

Vince Tran found an excellent utility for Enabling DCOM on Windows 2000/XP using SMS.  No more visiting the computer, going to dcomcnfg, +Component Services, +Computers, right-click my computer, Default Properties tab, and check 'enable dcom'.  All Vince needed help with from me was the mof edit so he could get the collection of "Machines with dcom disabled".  Since enabling dcom via script has been mentioned enough in the forums, etc, this was too cool not to share.  Vince doesn't yet have a blog, so he gave me permission to outline the steps.

  • The command to enable dcom is DCOMBOB enable   (to disable, is DCOMBOB disable)  A reboot is required before you'll actually see it enabled or disabled in dcomcnfg.
  • The MOF edit is below; once machines start reporting, just create a collection of machines where EnableDcom=N, and target them with the ad.

//  <:[-<>>>>>>>>>>>>Start>>-DCOM Enabled-<<Start<<<<<<<<<<<<<<<<<>-]:>
//`'`*._.*`'`*-
//  DCOM Data Class
//`'`*._.*`'`*-
#pragma namespace("\\\\.\\root\\cimv2")
#pragma deleteclass("DCOMEnabled", NOFAIL)
 [DYNPROPS]
 class DCOMEnabled
{
 [key] string KeyName="";
 string  EnableDCOM;
};
 
//`'`*._.*`'`*-
//  Instance of DCOM
//`'`*._.*`'`*-
 
 [DYNPROPS]
 instance of DCOMEnabled
{
 KeyName="EnableDcom";
 [PropertyContext("local|HKEY_LOCAL_MACHINE\\Software\\Microsoft\\OLE|EnableDCOM"),
 Dynamic, Provider("RegPropProv")] EnableDCOM;
};
 
//`'`*._.*`'`*-
//  DCOM Reporting Class
//`'`*._.*`'`*-
 
 #pragma namespace("\\\\.\\root\\cimv2\\SMS")
 
 [SMS_Report(TRUE), SMS_Group_Name("DCOMEnabled"),SMS_Class_ID("SMSExpert|DCOMEnabled|1.0")]
 class DCOMEnabled : SMS_Class_Template
{
 [SMS_Report(TRUE),key] string KeyName;
 [SMS_Report(TRUE)]  String EnableDCOM;
};
//  <:[-<>>>>>>>>>>>>>>>>>END>>-DCOM Enabled-<<END<<<<<<<<<<<<>-]:>

Published Friday, November 16, 2007 5:09 PM by skissinger
Filed under: ,

Comments

No Comments