Yes you are correct. I managed to find this code by searching the forum. So I fixed that. I may have to go with a GPO for settings here though because I have discovered that I need to reset ownership permissions which can't be done on the user login script and the user profile won't exist until the user logs in - so catch 22 situation.

I didn't realise this earlier as my test machine already had the permissions reset when I manually set libraries to show/hide in W10.