Hi I don't have a test SCCM server to check this out on so thought I'd run it past the lovely forum to check I'm writing this up correctly before implementing it.
I have a few requirements from a security compliance to start logging and double checking things. Figure I would start with an easy regkey check one to learn the process (knowing things like this could be config items).
The goal is to read the PowerShell version keys against every device and see what exists out there. I'm writing up the modification I would compile within the Configuration.MOF file running through this guide http://schadda.blogspot.com/2012/02/sccm-2012-customize-extend-hardware.html
I'm placing it in the add extensions section and it looks like the below. Does this ring true or am I making a newbie mistake?
//=======================================================
// Microsoft Powershell Version
//=======================================================
#pragma namespace ("\\\\.\\root\\cimv2")
#pragma deleteclass("Win32Reg_SMSPowerShellVersion", NOFAIL)
[DYNPROPS]
class Win32Reg_SMSPowerShellVersion
{
[key] string PowerShellVersion;
string PowerShellVersionV2;
string PowerShellVersionV3
};
[DYNPROPS]
instance of Win32Reg_SMSPowerShellVersion
{
InstanceKey = PowerShellVersion";
[PropertyContext("local|HKEY_LOCAL_MACHINE\\Software\\Microsoft\\PowerShell\\1|PowerShellVersion"),
Dynamic, Provider("RegPropProv")]
PowerShellVersionV2;
[PropertyContext("local|HKEY_LOCAL_MACHINE\\Software\\Microsoft\\PowerShell\\3|PowerShellVersion"),
Dynamic, Provider("RegPropProv")]
PowerShellVersionV3;
};