Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How to import Option 43 in Hex with PowerShell

$
0
0

Anyone know how to import option 43 in Hex value such as 1H03A802A?

The following script used by IPAddresses.

Import-Module .\Microsoft.DHCP.PowerShell.Admin.psm1
Import-Csv D:\dhcp.csv | foreach {Set-DHCPOption -Owner $_.Owner -OptionID 43 -DataType IPADDRESS -Value "192.168.121.11 192.168.121.12"}

DHCP.csv file as below

Name,ScopeAddress,SubnetMask,Gateway,StartAddress,EndAddress,Owner
Vlan001,192.168.112.128,255.255.255.128,192.168.112.129,192.168.112.170,192.168.112.254,DHCPSRV001/192.168.112.128
Vlan002,192.168.113.0,255.255.255.192,192.168.113.1,192.168.113.12,192.168.113.62,DHCPSRV001/192.168.113.0
Vlan003,192.168.113.64,255.255.255.192,192.168.113.65,192.168.113.76,192.168.113.126,DHCPSRV001/192.168.113.64


Viewing all articles
Browse latest Browse all 15028

Latest Images

Trending Articles



Latest Images