Looks like the old link on myitforum doesn't link right.  Here's what was
in there:

This was written in 2009; so it was for CM 2007, that's why it referenced
sms_def.mof.  But basically, you add a customization to configuration.mof,
and then import the sms_def.mof piece; to inventory just local policies in
requestedconfig on clients.

//============================
//  Add to SMS_Def.mof
//============================
#pragma namespace("\\\\.\\root\\cimv2\\sms")
#pragma deleteclass("win32_LocalPolicies",NOFAIL)
[SMS_Report(TRUE), SMS_Group_Name("Local Policies"),
 SMS_Class_ID("CUSTOM|win32_LocalPolicies|1.0")]
class win32_LocalPolicies : SMS_Class_Template
{
[SMS_Report(TRUE), key] string PolicyID;
[SMS_Report(TRUE), key] string PolicyInstanceID;
[SMS_Report(TRUE), key] string PolicyRuleID;
[SMS_Report(TRUE), key] string PolicySource;
[SMS_Report(TRUE), key] string PolicyVersion;
};

 //============================
//  Add to Configuration.mof if ConfigMgr07
//============================
#pragma namespace("\\\\.\\root\\cimv2")
[union, ViewSources{"select
policyid,policyinstanceid,policyruleid,policysource,policyversion from
CCM_Policy where PolicySource='Local'"}, ViewSpaces{"
\\\\.\\root\\ccm\\policy\\machine\\requestedconfig"}, Dynamic, provider
("MS_VIEW_INSTANCE_PROVIDER")]

class win32_LocalPolicies
{
  [PropertySources{"PolicyID"}, Key]          string PolicyID;
  [PropertySources{"PolicyInstanceID"}, Key]  string PolicyInstanceID;
  [PropertySources{"PolicyRuleID"}, Key]      string PolicyRuleID;
  [PropertySources{"PolicySource"}, Key]      string PolicySource;
  [PropertySources{"PolicyVersion"}, Key]     string PolicyVersion;
};

I did a quick spot-check; it'll pull back other local policies, like local
policy overrides for disabling specific agents (like Remote Control, or SW
Distrib), but it may not be easily discernable what a particular local
policy is for.  Once you get local policy information back, you might need
to do some research to be able to pair up (via a select case report)
PolicyID of {someRandomChar} means a particular agent is disabled.

On Wed, Jul 5, 2017 at 12:07 PM, Sherry Kissinger <
sherrylkissin...@gmail.com> wrote:

> Steal my CI for that and customize it for your needs:
> https://mnscug.org/blogs/sherry-kissinger/355-
> selectively-disable-software-distributions-and-application-
> deployments-on-clients
>
>
> On Wed, Jul 5, 2017 at 11:35 AM, <henry.wil...@sanofi.com> wrote:
>
>> Hello Jason
>>
>> Missed that – Thanks
>>
>> The reason – a few years ago our Industrial Group required Software
>> Distribution/Software Updates to be disabled as these were very sensitive
>> systems.  So someone in the business executed this on many systems:
>>
>>
>>
>> WMIC /namespace:\\root\ccm\policy\machine\requestedconfig path
>> ccm_SoftwareDistributionClientConfig CREATE
>> ComponentName="SmsSoftwareDistribution",Enabled="false",
>> LockSettings="TRUE",PolicySource="local",PolicyVersion="1.0"
>> ,SiteSettingsKey="1" /NOINTERACTIVE
>>
>>
>>
>> They also did it for Software Updates!
>>
>>
>>
>> Now they need to find these systems to reverse the setting – That’s the
>> reason I need to enumerate these settings.
>>
>>
>>
>> Thanks!
>>
>>
>>
>>
>>
>> *From:* listsad...@lists.myitforum.com [mailto:listsadmin@lists.myitf
>> orum.com] *On Behalf Of *Jason Sandys
>> *Sent:* Wednesday, July 05, 2017 11:51 AM
>> *To:* mssms@lists.myitforum.com
>> *Subject:* [mssms] RE: WMI Inventory in SCCM
>>
>>
>>
>> You didn’t go to the proper namespace; you went to root\ccm but you need
>> to go to root\ccm\Policy\Machine\ActualConfig.
>>
>>
>>
>> I’m not sure it’s a good idea to inventory these though. I can’t think of
>> why it would be bad explicitly, but it seems wrong because it’s ConfigMgr
>> data. What challenge are you are trying to address?
>>
>>
>>
>> J
>>
>>
>>
>> *From:* listsad...@lists.myitforum.com [mailto:listsadmin@lists.myitf
>> orum.com <listsad...@lists.myitforum.com>] *On Behalf Of *
>> henry.wil...@sanofi.com
>> *Sent:* Wednesday, July 5, 2017 9:16 AM
>> *To:* mssms@lists.myitforum.com
>> *Subject:* [mssms] WMI Inventory in SCCM
>>
>>
>>
>> Hello All
>>
>> I’m trying to report on a WMI namespace as follows:
>>
>>
>>
>> Looking to collect several of the properties for these classes.
>>
>>
>>
>> I attempted to connect to a sample system (wmi shown above) from the
>> Client Settings / Hardware Inventory and see this:
>>
>>
>>
>> How would I get the above highlighted classes to show?
>>
>> Thanks
>>
>>
>>
>>
>>
>>
>>
>>
>
>
> --
> Thank you,
>
> Sherry Kissinger
>
> My Parameters:  Standardize. Simplify. Automate
> Blog: http://mnscug.org/blogs/sherry-kissinger
>



-- 
Thank you,

Sherry Kissinger

My Parameters:  Standardize. Simplify. Automate
Blog: http://mnscug.org/blogs/sherry-kissinger



Reply via email to