Windows Computers Not Collecting User and Location Info


Hi everyone,

We were successfully able to implement GPO (via this article to bring our domain joined (bound) Windows computers to the JSS for inventory purposes.

And even though, in "Computer Inventory Collection", the "Collect user and location information from LDAP" is abled, the user and location info is not being collected when the Windows computers are reporting to the JSS.

LDAP seems to be working fine, because if I go to the "User and Location" section for any computer and do a "Look up in LDAP", user and location info is pulled without any issues.

So, I have a bunch of Windows computers in our inventory but no user and location info assigned.

Any ideas on how to make this work, so that when Windows computers report via the GPO, the user and location info is also collected through this process.

Thank you.


Release Candidate Programs Tester

The below is how to do it on a mac,

I wonder if the $3 option mentioned would work on PC's too?



Thank you for your reply here.

I dug deeper and found out the GPO is being setup and ran with the script below, which I took your $3 suggestion and insert it where the user name is called... similar how you have it outlined in your article. However, it is still not pulling the user and location info from LDAP.

I'm posting the script in case you or someone have any ideas or directions.

Thank you.

Again, below is the script:

On Error Resume Next

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("")
Set objShellApp = CreateObject("Shell.Application")
Set environmentVar = objShell.Environment("PROCESS")
set objNetwork = createobject("")

strADsPath = getUser(objNetwork.Username)
set objUser = GetObject(strADsPath)
jamfDir = "C:DriversScriptsRecon"


runReconCommand = """"&jamfDir&"jamf.exe"&""""&" recon -overrideJSS " & jssAddress & " -username " & username & " -password "& password &" -email " & objUser.mail & " -room " & objUser.physicalDeliveryOfficeName & " -endUsername " & objuser.sAMAccountName

Set oExec=objShell.Exec(runReconCommand)

Function getUser(Byval UserName) DIM objRoot DIM getUserCn,getUserCmd,getUserRS on error resume next set objRoot = getobject("LDAP://RootDSE") set getUserCn = createobject("ADODB.Connection") set getUserCmd = createobject("ADODB.Command") set getUserRS = createobject("ADODB.Recordset") "Provider=ADsDSOObject;" getUserCmd.activeconnection=getUserCn getUserCmd.commandtext="<LDAP://" & objRoot.get("defaultNamingContext") & ">;" & "(&(objectCategory=user)(sAMAccountName=" & username & "));" & "adsPath;subtree"

set getUserRs = getUserCmd.execute if not rs.BOF and not rs.EOF then getUserRs.MoveFirst getUser = getUserRs(0) else getUser = "" end if

end function