Note: If you examine the source code, you'll find a few other options for the random-mac() function to play with. To modify the registry, but not disable and enable the NIC, and not release or renew any DHCP leases: new-macaddress.ps1 -donotresetinterface To delete the registry value for the custom MAC address so that the built-in MAC of the NIC will be used instead (revert to factory default): new-macaddress.ps1 -resetdefault To select a random MAC address with a valid vendor ID number, and either assign the MAC to the sole physical interface, or, if there are multiple interfaces, prompt the user to select the desired interface: new-macaddress.ps1 You must be a member of the local Administrators group. The New-MACaddress.ps1 script requires PowerShell 2.0 or later. If this is the case for your particular NIC, use the -Wireless switch to set that special bit. Note that many interfaces, such as for your particular 802.11 wireless card, will not accept a custom MAC address unless a special bit in the MAC indicates that it has been customized.By default, the script changes the MAC, releases the DHCP lease for that one NIC, disables the NIC, enables the NIC, and then renews its DHCP lease again if you don't want this behavior, use the -DoNotResetInterface switch, but note that the new MAC address will not become effective until after the NIC is reset.The MAC will be random, except that it will have a valid manufacturer identifier from a common vendor like Intel, Apple or Netgear.If you have multiple NICs, the script will ask you which to modify, or you can pass in the NIC number as an argument.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |