Skip to main content

assign IP and computer name automatically as a post-command after restore

Thread needs solution

Cheers,

has anyone made some experiences with restoring several computers from one (central) tib-Image using post-restore-commands?

I need to use static IP's.
After the restore all computers get the (same) IP assigned that was set before creating the tib-File.

I would like to identify each computer by using a post-restore-script (identify the computer by MAC-Adress for example) and automatically assign the correct IP and computername that should be used for each hardware.

Has anyone managed to do this before and could share some advices or batch-snippets?

OS is Win7 64bit

Best wishes

0 Users found this helpful

Thanks for the link but this script needs an interaction with the user (see the echo's).
We already have batchfiles for each computer like settings_pc1.bat, settings_pc2.bat and so on.
What we want to do is to assign the IP's and computernames automatically so that there is no need for an adminstrator to select the proper batchfile manually or to answer questions or type the settings manually like in this case:
echo "Please enter Static IP Address Information"
echo "Static IP Address:"
set /p IP_Addr=

echo "Default Gateway:"
set /p D_Gate=

echo "Subnet Mask:"
set /p Sub_Mask=

So the idea ist to use just one batchfile with no interaction. The batchfile should pick the MAC-Adress of the PC and assign automatically(!) the correct IP and computername.

I already found this:

https://social.technet.microsoft.com/Forums/scriptcenter/en-US/7bd23924…
https://social.technet.microsoft.com/Forums/scriptcenter/en-US/dd3e3b27…

but this but there is still the main thing missing: how to use something like case when or if else and iterating through all mac-adresses of my PC's network-cards and determine which PC it is.

So if anyone has done this before and can give some advices this would be great ;)

PS: I'll just downloaded wsname... will see if this is an option: http://newstuff.clarke.co.nz/wsname