ConfigMgr : Create New computer programattically for OS deployment

Copper Contributor

I am using below code to create a new computer in SCCM.

 

Dim connection As WqlConnectionManager = Connect(siteServer)

connection.ExecuteMethod("SMS_Site", "ImportMachineEntry", inParams)

 

Further to this, looking to process the request for OS deployment too.

 

Do I need to add the data discovery record (DDR) as well to SCCM site, to process the deployment instantly? Or creating new computer itself will take care of updating DDR records in the database as well.

 

1 Reply

@Pradeep_Bansal 

Process what "request" for deployment?

If the system doesn't have a client agent, there's no way to force the system to do anything automatically. Creating a resource enables known computer support for OSD when you manually PXE boot or boot a system from boot media. You can't [magically] force an unmanaged system to do something.

The ImportMachineEntry method already creates/uses a DDR as that's the only [supported] way to create a resource in ConfigMgr. As noted, this doesn't make the target system "managed" though. It simply makes it "known" to the site by MAC Address and/or SMBIOS GUID which enables booting to WinPE using PXE or boot media as noted.