SET ADDomainPath=dc=com/dc=acme/dc=D2
SET ADOUPath=%col3%
[Settings_End]
[Machines_Begin]
\\EDU8
[Machines_End]
[Batch_Begin]
Data.Loop
// Look up AD path for UPN
SET ADpath=ADValue (UserPrincipalName,%col1%@d2.acme.com,ADpath)
If "%ADpath%"<> Then
// Set logonscript
AD.Account.SetProperty %ADpath%, LoginScript, %col2%
Else MessageBox "Sorry, %col1% not found in AD."
EndIf Data.EndLoop
[Batch_End]