Thanks that is great - not sure how i missed that but hey..
The problem is that that pulls the computername from the Database not from WMI - if i am correct?
The thing is this is using computername before the image has even been applied so there is no entry in the Database for these machines - or is there?
I can see some machines in the PXE provisioning Queue but they have different names to my WMI names which i what i need it to correspond to.
for eg A machine name from WMI is
this is not visible in the PXE Queue but a
That is the random name that Landesk gives a machine before it has the client installed but its also what it will pick up with %LdHostname%
any way round this? Or if i am wrong correct me!
That number is actually not the LANDesk device ID. It's the MAC address of the network card you are plugged into on the client device. It is really the only easily accessible unique value that can be picked up during the PXE boot process.
Using WMI to determine host name when imaging a machine is nearly useless, because the name needs to be assigned before WMI can readily report what it is. In the case of reimaging a machine with the same name as before pulling from the DB is great. In the scenario where it needs to be either renamed, or it's a new device you can use the CSVImport tool (found in the ManagementSuite directory on the core). It will allow you to easily import MAC addresses and assign each one a device name. The MAC addresses can either be provided by your OEM when you order, or (in the case of existing devices that simply need to be renamed upon reimaging) they can be gathered from the inventory.
Here's a link on how to use CSVImport: