Good glad to hear you got it working.

Let me point out a minor item though.

Using just a $ to hold your variable is quite legal and I think I'm one of the few that buck using it. As you're scripts get bigger and when you need to go edit them and you try to go find and change $ Guess what! You're going to have an extremely difficult time finding and replacing or updating that var or line of code after the var because EVERY single var also has to have a $

It is my recommendation to always use some type of meaningful name for your var. $Nul, $RC, $HKLMR, $OldUsers, $NewLink, etc....

Then you can easily find and update code much easier and others that come along after you also have a much easier time updating the scripts.

Also, for a production script you should COMMENT your code at least to some degree so that later on you know what is happening, or again, if someone else new has to modify your code because you're out sick or have left the Company, then it will be easier for them as well.

.