Hi Lucd,
i have tried your Solution with VCSA 8. But it not works..
see here:
$dns = Get-CisService -Name 'com.vmware.appliance.networking.dns.servers'
$dnsservers = "1.1.1.1, 8.8.8.8"
When i put the variable in the servers String or the String itself is the same result:
$dns.set(@{mode = 'is_static';servers = @($dnsservers)})
$dns.set(@{mode = 'is_static';servers = @('1.1.1.1, 8.8.8.8')})
A server error occurred: 'com.vmware.vapi.std.errors.error': DNS Server: 1.1.1.1, 8.8.8.8 does not appear to be a valid IPv4 or IPv6 address. (Server error
id: 'com.vmware.applmgmt.err_invalid_dns_servers'). Check $Error[0].Exception.ServerError for more details.
At line:1 char:1
+ $dns.set(@{mode = 'is_static';servers = @('1.1.1.1, 8.8.8.8')})
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], CisServerException
+ FullyQualifiedErrorId : VMware.VimAutomation.Cis.Core.Types.V1.CisServerException
Any Suggestions what i am doing wrong??