Your company's ad could live here and reach over 50,000 people a month!

Share This Post

DateTime Attributes in DDR Files

The SCCM Client Center Automation Library does now support creating DDR Files with DateTime Attributes.

The following example (C#) will generate a simple DDR with a DateTime Attribute (ADLastLogon):

smsclictr.automation.DDRFile oDDR = newsmsclictr.automation.DDRFile(“System”“CustomDiscovery”“C01”);

oDDR.DDRAddString(“Name”Environment.MachineName, 16, smsclictr.automation.DDRFile.DDRPropertyFlagsEnum.ADDPROP_NAME |

smsclictr.automation.DDRFile.DDRPropertyFlagsEnum.ADDPROP_KEY);

oDDR.DDRAddString(“Netbios Name”Environment.MachineName, 16,

smsclictr.automation.DDRFile.DDRPropertyFlagsEnum.ADDPROP_NAME);

oDDR.DDRAddDateTime(“ADLastLogon”DateTime.Parse(“26.04.2012 13:45:00”),

       smsclictr.automation.DDRFile.DDRPropertyFlagsEnum.ADDPROP_NONE);

oDDR.DDRWrite(@”C:\TEST.ddr”);

as a result, you will get a DDR File in C:\Test.ddr that has the following structure:

BEGIN_PROPERTY

<76><Name><11><16><myComputer>

END_PROPERTY

BEGIN_PROPERTY

<68><Netbios Name><11><16><myComputer>

END_PROPERTY

BEGIN_PROPERTY

<0><ADLastLogon><12><4><04/26/12 13:45:00>

END_PROPERTY

AGENTINFO<CustomDiscovery><C01><4/26/2012 13:52:51>

Share This Post

Leave a Reply