I understand that an expired WinRM SSL certificate error is coming up when executing the Powershell script.
Try running through the following to see if it resolves the issue:
- Navigate to Lifecycle Services.
- In the Shared Asset library, click the Model
- Download the Renew WinRM certificate folder
- RDP to the environment
- Extract the zip file to a local folder
- Open mmc.exe and add Certificate snap-in (Computer)
- Open Personal\Certificates and locate the certificate with your VMs name which should have the expiration date passed
- Browse to the RenewWinRMCertificate folder that was previously created from extracting the zip file
- Right-click the file, select properties, and unblock it (if you see this option).
- Select File > Open Windows PowerShell with elevated privileges (Run as Administrator)
- Run .\VirtualMachine-RegenerateWinRMCertificate.ps1 from the folder.
The result should be something like this:
- Refresh the Certificates console and confirm the Certificate has been created and the expiration date is now valid. (Optional: Delete expired certificate to avoid confusion)
- Restart the Environment from LCS (Stop \ Start)
- In LCS select Maintain > Rotate secrets
Select ‘Rotate the SSL certificates‘.