View Only
  • 1.  Set Default Gateway

    Posted May 13, 2015 11:24 AM

    Looking over our customization wizards and am wanting to tweak our 'domain join' setup. Currently it seems we would need a new wizard for every network subnet that we have since you can't prompt for the default gateway. (only IP) We currently utilize a post execution power shell script that joins to the domain and adds to a specific OU. I was hoping to tweak this to set the default gateway depending on what the current IP address is of the VM. Basically get the current IP and change the last octet to .1 should do it. Anyone have any thoughts on this process? Is there a better way to accomplish this? If not what would that command look like? Thanks all.

  • 2.  RE: Set Default Gateway

    Posted May 13, 2015 12:40 PM

    Why do you need to prompt, with the New-OSCustomizationNicMapping and/or  Set-OSCustomizationNicMapping cmdlets you should be able to automate this.

  • 3.  RE: Set Default Gateway

    Posted May 13, 2015 12:51 PM

    I may be missing the obvious here but I need to prompt as we do not use DHCP or have an IPAM solution for IP. I wish it was 100% automated.

  • 4.  RE: Set Default Gateway

    Posted May 13, 2015 01:04 PM

    That shouldn't be a problem, you can do static as well.

    See for example 2.  Re: Cloning Multiple VM's with Temporary Customized Specifications

  • 5.  RE: Set Default Gateway

    Posted May 13, 2015 01:19 PM

    So, I guess I wasn't very clear and that is my fault. I do want my admins to still utilize the UI for building virtual machines. I don't know that pushing them to all user powercli is the answer just yet. (I don't even really know it as you can tell) We have around 30 different possible network subnets in our vm farm and I am just trying to avoid creating that many customization wizards all because I can't force the wizard to prompt them for the default gateway. (you can only get the IP address to prompt) We have a power shell script already in place as part of the post execution process and was thinking that I might be able to edit it to set the DG depending on what the IP address was from the previous entry before the vm creation kicked off. I have seen the powercli scripts that query a spreadsheet for information and then automation takes over from that point but I am honesty not crazy about that process. If I had 10 or more builds to do then sure that would be an excellent solution but I am really just talking about your one off build requests.