I meant it as an example of script. Can you share snippits of the code you are using? The main point of the code I shared was the /RL HIGHEST which allows you to run the command at the highest level of permissions.
Don't forget to mark the post that solved your issue as "Answered." By marking the Answer you are enabling users with similar issues to find what helped you. Lewis Renwick - IT Professional