the above sample code slightly modified and working for me. Thanks for the code sample.
I can't able to use PowerShell cmdlets msNPCallingStationID, msNPSavedCallingStationID. then I used to go for the ADSI method. In this method, I can able to store MAC address in this dial-in property field. But the issue is I can't change or modify the MAC address that is already stored.
$samAccountName | Set-ADUser -Replace @{msNPCallingStationID=$msNPCallingStationID; msNPSavedCallingStationID=$msNPSavedCallingStationID}
the above sample code slightly modified and working for me. Thanks for the code sample.