beatcracker / VSCELicense

PowerShell module to get and set Visual Studio Community Edition license expiration date in registry
Microsoft Public License
306 stars 94 forks source link

getting registry key not found error for VS 2019 community #12

Closed eric10k93 closed 3 years ago

eric10k93 commented 3 years ago

after importing and attempting to run the "Get" command, I am getting a "registry key not found" error generated from the script... are there any known scenarios that would cause this to happen?

I'm running this on a Windows Server 2012 R2 machine. Strangely, I ran this script just fine maybe 6 months ago.

beatcracker commented 3 years ago

No idea, this shouldn't happen. Try running this and copy-paste output here:

try { Get-VSCELicenseExpirationDate } catch { $Error[0] | Format-List -Property * -Force ; $Error[0] | ConvertTo-Json -Depth 100 }
eric10k93 commented 3 years ago

I'm an idiot and I apologize for being a bother...

I just realized I'm running an older version of the script and was trying to use the parameterless call. Now that I take a second look at the error, I'm realizing it won't work because I'm not passing the version... that just wasn't supported with the script I was running.