I need to create a script that is able to -
1. Scan an entire IP scope (x.x.x.1 - 254)
2. If any device responds on that scope, use Win32_NetworkAdapterConfiguration to return DHCPEnabled status, DHCP server address & DNS server search order.
3. IF DHCPEnabled = FALSE then modify the DNS server search order to given addresses.
I've been using scriptomatic to get the DHCPEnabled status, but i've several scopes to check and it will take forever to enter each ip address into the array, is there a faster way to generate the array? Also, I notice I get a lot of duplicate entries for a system, even when I add WHERE IPEnabled=TRUE into select.
TIA
1. Scan an entire IP scope (x.x.x.1 - 254)
2. If any device responds on that scope, use Win32_NetworkAdapterConfiguration to return DHCPEnabled status, DHCP server address & DNS server search order.
3. IF DHCPEnabled = FALSE then modify the DNS server search order to given addresses.
I've been using scriptomatic to get the DHCPEnabled status, but i've several scopes to check and it will take forever to enter each ip address into the array, is there a faster way to generate the array? Also, I notice I get a lot of duplicate entries for a system, even when I add WHERE IPEnabled=TRUE into select.
TIA