Skip to content

Frequently Asked Questions (FAQ)

Ryan Bolger edited this page Jan 13, 2018 · 14 revisions

Frequently Asked Questions (FAQ)

Does Posh-IBWAPI work cross platform on Powershell Core?

YES! As of January 2018, PowerShell Core 6.0 is now GA. Minor code changes were required mostly to deal with the parameter differences in Invoke-WebRequest between Desktop and Core editions and the way TLS settings are handled. All OS platforms supported by PowerShell Core are supported by the module.

The underlying connection was closed: Cloud not establish trust relationship for the SSL/TLS secure channel.

Your Infoblox is either still using a self-signed SSL certificate or the custom certificate it's using is no longer valid. You can ignore certificate validation using the -IgnoreCertificateValidation parameter on most functions or set it for the session using Set-IBWAPIConfig.

ConvertTo-Json doesn't seem to be converting all nested objects

There's a -Depth parameter that "specifies how many levels of contained objects are included in the JSON representation". The default is 2 which is insufficient for some Infoblox objects. I usually set it to 5 just to be safe.

-IgnoreCertificateValidation not working consistently when used in the same session as VMware PowerCLI

There is unfortunately no native support in Invoke-RestMethod (or any related cmdlet) for per-call disabling of certificate validation. Validation logic is controlled globally at the .NET level on a per-session basis in System.Net.ServicePointManager. In order to mimic a per-call disable flag, we're essentially disabling cert validation globally just long enough to make our call to Invoke-RestMethod and then setting it back to the default functionality. But our ServicePointManager tweaks seem to sometimes conflict with whatever VMware is doing with PowerCLI to disable certificate validation.

The current recommendation is to just let PowerCLI take care of disabling validation and skip using the option in Posh-IBWAPI.

UPDATE: The version of Invoke-RestMethod included in Powershell Core 6.0 includes a -SkipCertificateCheck parameter which should resolve this issue at least for Core edition users. Hopefully Microsoft will back port those changes into Desktop edition eventually.

Clone this wiki locally