locked
Using The MacAddress as Username Variable in task sequence but with 00-00-00-00 instead of 00:00:00:00 RRS feed

  • Question

  • Hi,

    All our computers have an extra username in the form of their mac address in active directory. Based on group membership of this user the computer, by 802.1x, is placed into a different vlan for installation. Problem is the syntax is with - in bewteen instead of : because this character is not allowed in a username in active directory.
    I need somehow to change the macaddress format from : to - and then use the macddress as a variable for the maik koster webservice to add the "user" to a group.

    Any ideas?

    Regards,

    DJITS.

    Monday, December 12, 2016 11:03 AM

Answers

  • in your customsettings.ini file:

    MyAddrName = # replace( "%MACADDRESS001%",":","-") #


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    • Proposed as answer by Keith GarnerMVP Monday, December 12, 2016 10:45 PM
    • Marked as answer by DJITS Tuesday, December 13, 2016 2:14 PM
    Monday, December 12, 2016 10:45 PM

All replies

  • in your customsettings.ini file:

    MyAddrName = # replace( "%MACADDRESS001%",":","-") #


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    • Proposed as answer by Keith GarnerMVP Monday, December 12, 2016 10:45 PM
    • Marked as answer by DJITS Tuesday, December 13, 2016 2:14 PM
    Monday, December 12, 2016 10:45 PM
  • Hi Keith,

    Thank you so much, you really helped me out here.

    Is this common knowledge or did you find documentation somewhere?

    Regards,

    DJITS.

    Tuesday, December 13, 2016 2:16 PM