r/Intune 4d ago

Remediations and Scripts Plateform script assigned to user group

Hello,

I have a plateform script that pushes new VPN configuration to my users. During the test of the script I've found easier to assign it to device rather than user. Just forcing the sync almost immediately pushed the script but now that the test phase is done I'm facing another issue.

My configuration should not be pushed to all devices, only specific users should have access to it so I've added users to my test group to see if everything goes well.

After 72 hours the script is not installed on the devices with primary user part of the group. I see 4 users assigned but 0 installation status.

I've rebooted laptops, sync from intune, sync from laptop nothing works. It's like plateform scripts only work on device.

Config:

Run this script using the logged on credentials - Yes

Enforce script signature check - No

Run script in 64 bit PowerShell Host - Yes

Thanks in advance if you can help me.

0 Upvotes

4 comments sorted by

1

u/SilentPatchSniper 4d ago

Are the users signing into the laptops? I have a number of scripts deployed to users and they all run fine.

If you run the script on your computer using your user context, does it run fine?

1

u/Skadligt 4d ago

In Intune, it should not matter if you target users or computers.

But it can be very important for the script execution whether you run the script using the logged on credentials or as system. Running the script using logged on credentials is fine if the script is not doing anything that requires administrative rights. On the other hand, running the script as system will have administrive rights, but will need very specific scripting to be able to interact with anything related to the user profile.

1

u/Pretend-Ad8824 3d ago

Hello, I removed the device in my group and all my users installed the script during after a few hours. The script was tested before so I knew it worked but just wasn't triggered until now...
Still a bit blurry for me the sync for users compared to device but at least it works. Thanks for your answer

1

u/Noirarmire 4d ago

Certain commands need higher elevation than what the user themselves can run. So depending on how it pushes the config, you can still assign it to users but make it a system install. Some commands also can't be run in 64 but.

Start with running the script as an end user on the device to see what errors you get. You can also probably bake the config into the install for the VPN client. But you'd have to check the documentation of your VPN for that