Quantcast
Channel: Ivanti User Community: Message List
Viewing all articles
Browse latest Browse all 12704

Re: Can't use "Set Machine Data"

$
0
0

Hi,

 

This is a late answer but it may help other people.

 

Indeed you are right, it hasn't been designed in that way. And if you look at the SQL trace, you can see that it looks first to a machine with the Device Name corresponding to the one given in the action "Set Machine Data" which has a DeviceId "UNASSIGNED".

This is the case for a machine which has just been added by the action "Add/Delete Device".

 

MBSDK "Add Computer" will work in the same fashion and won't create any DeviceId neither, then it couldn't be a solution after testing it on LPM 6.0.1.

 

Here are the 2 SQL scripts run by LDMS:

 

---- 1ST STEP: (In my case Device Name is "SAMachine5") - It looks for the Devide Id corresponding to the Device Name defined in the action ----

SELECT DISTINCT A0.DEVICEID, A0.DEVICENAME, A0.DOMAINNAME, A0.LOGINNAME, A1.ADDRESS, A1.SUBNETMASK, A2.NICADDRESS, A3.OSTYPE  FROM Computer A0 (nolock) LEFT OUTER JOIN TCP A1 (nolock) ON A0.Computer_Idn = A1.Computer_Idn, NetworkSoftware A2 (nolock) LEFT OUTER JOIN Operating_System A3 (nolock) ON A2.Computer_Idn = A3.Computer_Idn  WHERE (A0.DEVICENAME = N'SAMachine5') AND A0.Computer_Idn = A2.Computer_Idn

 

---- 2ND STEP: As Device ID found in the Step 1 was "UNASSIGNED", It looks to this machine, hence the result ----

select Computer_Idn from Computer where DeviceId = @P1 ',N'@P1 nvarchar(10)',N'UNASSIGNED'

 

Adding a random Device ID via a SQL statement might work but also could cause other issues if you provision your machine thereafter for example. Hence, it has to be tested before hand carefully.

 

Another solution would be to create an SQL Statement through a LPM action "Execute SQL" in order to create the inventory key directly which will might be cleaner.


Viewing all articles
Browse latest Browse all 12704

Trending Articles