Did you check the InvalidCertificateAction setting?
Set it to Ignore if that is not the case.
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -confirm:$false
You might also check and configure the TLS level.
Make sure TLS1.2 is enabled
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
------------------------------
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
------------------------------
Original Message:
Sent: Oct 11, 2024 12:40 PM
From: Nick Charlesworth
Subject: invoke-vmscript - Object Reference Not Set to Object
I am moving over my Q&A to a discussion, because I didn't realize I couldn't ask any further questions. Basically, I am having issues getting output with invoke-vmscript when it should be getting some output at the least. I've followed LucD's advice to use invoke-vmscriptplus, and now my error is "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. What does that error mean? Thank you