albertwt Posted April 9, 2010 Posted April 9, 2010 (edited) Hi All, I'd like to perform database application transactional and concurrent load testing which requires approx. 100 IP address in a single host (Windows Server 2003 box) so that one NIC can have multiple IP address. Is there any quick way (Powershell / NetSH) to create those IP address in one single box ? example: VM-Simulator1 - 10.2.1.1 10.2.1.2 10.2.1.3 10.2.1.4 10.2.1.5 . . . 10.2.1.102 VM-Simulator2 - 10.2.2.1 10.2.2.2 10.2.2.3 10.2.2.4 10.2.2.5 . . . 10.2.2.102 i know how to do it in Windows Server 2003 manually one by one but that's too daunting to do it manually. Thanks. Edited April 9, 2010 by albertwt
srochford Posted April 9, 2010 Posted April 9, 2010 Does this help - To add a bunch of IP addresses to a network connection without having to type each one in individually 1
albertwt Posted April 22, 2010 Author Posted April 22, 2010 Finally I've found what I've been looking for: #setup collection of IP address strings, include original IP $ips = 1..100 | %{ "10.2.1.$_" } #also subnet masks, need as many as IP addresses $masks = 1..100 | %{ "255.255.255.0" } #get the NIC $nic = Get-WMIObject win32_networkadapterconfiguration -computer VM-Simulator1 | where { $_.IPAddress -contains "10.2.1.1" } #set addresses $nic.EnableStatic($ips,$masks) hope this can be helpful for everyone in this forum.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now