Microsoft--What a Mess
After perusing that mess of a script (Oh boy, was that fun) it appears to do two things
1. Scan the Volume Shadow Copy (vss) on the actual computer for *.lnk and restore it
2. Scan the registry for installed applications and create new new shortcuts in the Start Menu directory.
While 2 is ok enough, the damn vss is turned off by default after Windows 7 in favor of OneDrive being used to backup user data on workstations. So, if you have roaming profiles or rediredted user folders, etc, this script only restores the start menu shortcuts. (Though you can, through the script, get an idea how to do this sort of restore on a Windows file server).
Essentially, anyone following Microsoft guidance on the preffered ways to handle user data on workstations are borked when it comes to shortcuts and have to homebrew something to sort it out.
Microsoft is such a mess in a way that echoes the story of the Tower of Babel. They are too big and it is just making a huge mess for people. Microsoft wants a singular, all encompassing ecosystem, but the various organs of that great beast seem unable or incapable of communicating with each other. (From interviews and hearing from folks that have worked there, I am pretty sure I know which one is more prevalent). All we seem to get out of it with regularity is a crumbling structure, much indegestion, and a big mess.