-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CertificatePolicy obsolete in PowerShell 7.1 #4
Comments
Hello I had the same error when I try to use it PS /root> Connect-VIMobServer -Server "vc-test.corp" -SkipCertificateCheck cmdlet Connect-VIMobServer at command pipeline position 1 Add-Type: /root/.local/share/powershell/Modules/VIPerms/0.0.6/Private/Set-CertPolicy.ps1:24 Add-Type: /root/.local/share/powershell/Modules/VIPerms/0.0.6/Private/Set-CertPolicy.ps1:24 PS /root> VIGlobalPermission Add-Type: /root/.local/share/powershell/Modules/VIPerms/0.0.6/Private/Set-CertPolicy.ps1:24 did you find the solution on this? thanks and regards |
similar issue which I am also facing! Code that is erroring out:
My understanding so far: Based on my research I tried to compare the Powershell version of my build server vs gitlab pipeline Build server
gitlab pipeline
As I understand the piece of code does not work in powershell 7 Any suggestions which can resolve this issue |
Solution to Set-CertPolicy is below. Can we please request this be updated in the module? function Set-CertPolicy {
"@ |
Hello, I just want to make clear that I used ChatGPT to fix my problem, therefore, I will not be able to help with any questions regarding the code below. Okay, that said. @butch7903, thank you for you code, it really helped me to fix the But I stumbled in another error. After inserting my credentials, it trowed the following error. Okay, as I don't know much about PowerShell, I appealed to ChatGPT, in the code below ChatGPT added a step to verify if "System.Net.Http" (that contains the type
|
Thank you for this useful module.
We have been using it successfully with PowerShell version 5.1, but it appears that the switch -SkipCertificateCheck on the cmdlet Connect-VIMobServer does not work with powershell version 7.1
Searching online I see that ICertificatePolicy and CertificatePolicy are obsolete, https://docs.microsoft.com/en-us/dotnet/api/system.net.servicepointmanager.certificatepolicy?view=netframework-4.7.2
Is there a work around or an alternative way of using this module?
This is the error we get:
The version of Powershell that fails is 7.1.0
The text was updated successfully, but these errors were encountered: