PowerCLI

 View Only
  • 1.  invoke-vmscript - Object Reference Not Set to Object

    Posted Oct 11, 2024 12:41 PM

    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



  • 2.  RE: invoke-vmscript - Object Reference Not Set to Object

    Posted Oct 12, 2024 04:36 AM

    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


    ------------------------------