microsoft / azure-pipelines-extensions

Collection of all RM and deployment extensions
http://www.visualstudio.com/explore/release-management-vs
MIT License
278 stars 422 forks source link

Bump expiration date for WinRM certificate #1016

Open ZuljinSBK opened 2 years ago

ZuljinSBK commented 2 years ago

Current date is 1 Jan 2022 so the script is generating expired certificates and WinRM connection can't be established.

MantVas commented 2 years ago

Why to make it static again? My suggestion: $currentDate = get-date $expirationDate = $currentDate.AddYears(1) .\makecert -r -pe -n CN=$hostname -b $currentDate -e $expirationDate -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localmachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12