The service is added to the servicegroup, but the code returns an error:
invoke-nsxwebrequest : Invoke-NsxWebRequest : The NSX API response received indicates a failure. 400 : Bad Request : Response Body: <?xml version="1.0" encoding="UTF-8"?>
<error><errorCode>301</errorCode><details>Requested member application-cf8dd5a6-c03e-4e80-9836-17ba97bfaa0b is not a valid member for addition to Security Group
applicationgroup-6.</details><moduleName>core-services</moduleName></error>
At C:\Program Files\WindowsPowerShell\Modules\PowerNSX\3.0.1125\PowerNSX.psm1:26678 char:21
+ ... $null = invoke-nsxwebrequest -method "PUT" -uri $URI -connection ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidResult: (Invoke-NsxWebRequest:String) [Invoke-NsxWebRequest], InternalNsxApiException
+ FullyQualifiedErrorId : NsxAPIFailureResult,Invoke-NsxWebRequest
This does look like I try to add an invalid member type, but its not (and it IS added so that proves that it is not in invalid member type.
When I rename the service to "DHCPClient" without the dash, all works without the error.
Code:
The service is added to the servicegroup, but the code returns an error:
This does look like I try to add an invalid member type, but its not (and it IS added so that proves that it is not in invalid member type.
When I rename the service to "DHCPClient" without the dash, all works without the error.