This problem is a bit more complicate... In my previous post I asked about returning domain/username to csv file. (and thank you Mathias for quick response)
Now I need to update XML attribute with value from the csv file... while crossed-reference with wmi-object,username. My end goal is a logon script that change the value in the XML file with appropriate extension based on logon username.
Right now I am trying to write if-statement that will check if logonusername is equal to any entry of the csv table, then return with the extension. I am not sure where to begins actually.
If anyone can shed some light please do so. My idea right now is:
- get-aduser to csv with extension [done]
- add wmi-object>username to variable
- if-statement to look for the same variable(username) in csv table
- return variable with extension respective to the username
- update xml attribute with the new extension
Happy coding :)
Aucun commentaire:
Enregistrer un commentaire