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?
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.