Hi,
I've not tested it, but I believe if you import the certificate into your function app, make it accessible using WEBSITE_LOAD_CERTIFICATES=* setting, and then reference it using -CertificateThumbprint parameter, invoke-restmethod won't fail due to untrusted root.
In portal, browse to your function app, Certificates blade, and add your certificate. Once your certificate is imported you can go to Configuration blade - Application settings and add WEBSITE_LOAD_CERTIFICATES setting and set it to *
You would modify invoke-restmethod to be similar to below:
Invoke-RestMethod -Method 'GET' -URI $URI -CertificateThumbprint $certThumbprint
Below are articles that provide detailed information about importing/using certificates for your reference:
https://learn.microsoft.com/en-us/azure/app-service/configure-ssl-certificate
I did quick test by importing self-signed certificate into CurrentUser\My store and then called invoke-restmethod and it didn't throw exception. Based on the docs, this should (in theory) be equivalent to doing same thing in function with imported cert as I described above.
Please give it a try and let me know your results in a comment. If anything is unclear, let me know.
Thanks.
-TP