PS Scripts not running when Run this script using the logged on credentials

Chris Dewey 1 Reputation point
2022-03-27T21:04:24.163+00:00

Hi,

I have made several PS Scripts some need to be run using the logged-on credentials, But when I select yes to this the script does not run and does not show in the monitor as being run.

If I change Run this script using the logged-on credentials to NO the script runs without issues. But as its needs to be run on the logged-on credentials it doesn't complete what I need it to do.

So I know its not an Assignments issue seeming it runs when the credentials setting is no.

Any assistance would be great

Microsoft Security | Intune | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lu Dai-MSFT 28,496 Reputation points
    2022-03-28T02:53:14.13+00:00

    @Chris Dewey Thanks For posting in our Q&A.

    For this issue, if you set "Run this script using the logged on credentials" to "Yes", it means that we run the script with the user's credentials on the device. It is needed that the signed in user has the appropriate permissions to run the script.
    https://learn.microsoft.com/en-us/mem/intune/apps/intune-management-extension#issue-powershell-scripts-do-not-run
    187327-image.png

    So, it is suggested to try to run the script mamually using the target use on the device and check if it works.

    If there is anything update, feel free to let us know.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.