Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShell task does not run on assigned user or devices #27

Open
sword134 opened this issue Jan 16, 2023 · 5 comments
Open

PowerShell task does not run on assigned user or devices #27

sword134 opened this issue Jan 16, 2023 · 5 comments

Comments

@sword134
Copy link

sword134 commented Jan 16, 2023

Hello,

Following the instructions on the page i've setup a powershell script to run on the "TestUser" group which I have created in Microsoft Endpoint Manager. This group consists of 2 users and 2 devices, however despite trying several times, the script to restore the shortcut's deleted by the microsoft defender update still does not run. It simply lists the script as "0 successes, 0 errors on 0 devices".

Trying to run the restore.ps1 script on my device locally throws a "UnauthorizedAccess" error.

How do I fix this? I've searched around and made sure that my device and workaccount are linked/enrolled via Azure AD, yet I still cant make the restore shortcut script run.

Under device status in the script my device is simply listed as "Status: Unknown", yet I can see OS version, device ID and username associated.

@leeburridge
Copy link

Have you set to run in system context?
image

Needs to look like that.

@ckennedy666
Copy link

You need to run this against Computers, not Users. A user-based group will likely fail.

@sword134
Copy link
Author

@ckennedy666 i've added both devices and users to the group. So why doesnt it run on the chosen devices in the group?

@ckennedy666
Copy link

I've only had success with a device only group.

@sword134
Copy link
Author

I've only had success with a device only group.

Even if a group only contains devices, then it still doesnt work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants