vCenter

 View Only
  • 1.  Powercli - change custom spec network back to default settings

    Posted Sep 11, 2013 06:20 PM

    I've used Set-OSCustomizationNicMapping to change a custom spec's IP settings to a static IP address.

    But how can I change it back to default instead of custom settings using Powercli?

    Thanks



  • 2.  RE: Powercli - change custom spec network back to default settings

    Posted Sep 12, 2013 02:57 AM

    Have you tried "Remove-OSCustomizationNicMapping" and check whether it reverts to default.



  • 3.  RE: Powercli - change custom spec network back to default settings

    Posted Sep 12, 2013 02:44 PM

    That was a good suggestion, but it doesn't revert the Network settings inside the Customization Specification to "Typical". Instead, it's still set at "Custom", but everything is blank.

    Here's what I did:

    Get-OSCustomizationSpec <CustomSpecName> | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -ipmode usestaticip -ipaddress x.x.x.x -subnetmask 255.255.255.0 -defaultgateway x.x.x.x -dns x.x.x.x

    Then afterwards I want to clear that out...

    Using your suggestion, I tried this...

    Get-OSCustomizationSpec <CustomeSpecName> | Get-OSCustomizationNicMapping | Remove-OSCustomizationNicMapping

    Command completed, but it didn't change it back to Typical. Just left it Custom, with nothing specified.