I usually write batch files, but was wondering if anyone can tell me how to use the NETSH command in VBS.
Dim ServerName 'Server Name
Dim Scope 'scope
Dim ip 'ip of reservatio to be made
Dim MAC 'MAC address
Dim hostName 'Device hostname
ServerName = InputBox("Enter name of Server")
Scope = InputBox("Enter Scope")
ip = InputBox("Enter IP to reserve")
MAC = InputBox("Enter MAC")
hostname = InputBox("Enter Printers hostname")
An example of the command i want use is:
netsh Dhcp Server 10.0.0.1 Scope 10.0.0.0 Add reservedip 10.0.0.11 00AA11BB22CC "compname.domain.local" "compname.domain.local" "BOTH"
Executing the CMD file add the reservations to DHCP matching the IP address and MAC to the computer name. The computer name is listed twice so that it is the Reservation name and the description
Dim ServerName 'Server Name
Dim Scope 'scope
Dim ip 'ip of reservatio to be made
Dim MAC 'MAC address
Dim hostName 'Device hostname
ServerName = InputBox("Enter name of Server")
Scope = InputBox("Enter Scope")
ip = InputBox("Enter IP to reserve")
MAC = InputBox("Enter MAC")
hostname = InputBox("Enter Printers hostname")
An example of the command i want use is:
netsh Dhcp Server 10.0.0.1 Scope 10.0.0.0 Add reservedip 10.0.0.11 00AA11BB22CC "compname.domain.local" "compname.domain.local" "BOTH"
Executing the CMD file add the reservations to DHCP matching the IP address and MAC to the computer name. The computer name is listed twice so that it is the Reservation name and the description