GPO script logOff is running with elevated permissions, can't run OneDrive correctly.

Станістав Ільїн 0 Reputation points
2024-07-23T07:58:42.1966667+00:00

GPO script logOff is running with elevated permissions, can't run OneDrive correctly (it reports that it is not possible to run as administrator, even though I configured the policy in userconfiguration - windows settings - scripts LogOn\LogOff) How to run it with the current user's permissions that performs the exit?

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,110 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,509 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue 36,751 Reputation points Microsoft Vendor
    2024-07-24T02:14:03.4866667+00:00

    Hi,

    Please create a new scheduled task under User Configuration > Preferences > Control Panel Settings > Scheduled Tasks and select New > Scheduled task (At least Windows 7) to run your script. In the General tab, choose the user account to use and check "Run with highest privileges".

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.