Get-RegKey filled in. It's a copy paste from an earlier script of mine with some tidying up done.