Feb 04 2022 04:33 AM
Hi folks,
I need help checking the status "Speculation Execution Side-Channel Vulnerabilities".
I use the document "Understanding Get-SpeculationControlSettings PowerShell script output" with reference.
I'm trying to use a powershell script via intune, but there is a permission error because users don't have admin permission on their workstations.
Is it possible to configure the script or environment to allow installing the module with a regular user?
Feb 04 2022 05:33 AM
Feb 05 2022 01:14 PM
Hi @Harm_Veenstra ,
Even using the option "-Scope Currentuser" I see the following error in the log:
[PowerShell] User Id = c16a6a16-2f0d-4148-80be-8bf7cca6fbf2, Policy id = bc108d02-ac34-41c3-a072-e16b7f26b1ae, policy result = Failed
[PowerShell] Fail, the details are {"Version":1,"SigningCode":649,"SigningMsg":"(Success) AccountId:95fb4322-d2af-4011-af4b-e98b056b4560,PolicyId:bc108d02-ac34-41c3-a072-e16b7f26b1ae,Type:1,Enforce: Audit. OSVersion:10.0.19044,AgentVersion:1.50.203.0. ","ExecutionMsg":"Powershell execution has exceeded defined timeout."}
NOTE 1: The same script works manually on the workstation.
NOTE 2: The file (bc108d02-ac34-41c3-a072-e16b7f26b1ae.ps1) is successfully created on the workstation and after the timeout error it is automatically deleted.
Any ideas, is it possible to increase the timeout?
Feb 05 2022 01:23 PM
Feb 05 2022 11:48 PM
Feb 07 2022 10:24 AM
Hi @Rudy_Ooms_MVP ,
If I understand correctly, I'm doing what you recommend. I'll attach the log here, if you can take a look.
Feb 11 2022 01:07 AM - edited Feb 11 2022 01:07 AM
I have found what's wrong. When your script using Start-Transcript you definitely need to use Stop-Transcript at end of the script. Or Intune cannot finish with success status
Feb 16 2022 02:09 AM
Hi @Acreature
I'm using Stop-Transcript, but same issue occur.
If I'm using it locally, the script runs fine, but when it runs through intune it just writes the beginning and nothing else happens.
Feb 16 2022 02:16 AM
Feb 16 2022 03:31 AM
Feb 16 2022 03:40 AM - edited Feb 16 2022 03:40 AM
Looging at the script.. It exits the script without the stop-transcript and not exiting correctly?
Change:
"
exit 0
exit
Stop-Transcript
"
to:
"
Stop-Transcript
exit 0
"
Feb 18 2022 09:30 AM
yep, when I use psexec local it works fine, but when in the Intune, same issue occur.
The issue only occurs through Intune, if I run the local script it runs fine.
Yes, in the agentexecutor.log I can see the script starting and after 30 min I see the timeout fail.
# Output agentexecutor.log
cmd line for running powershell is -NoProfile -executionPolicy bypass -file "C:\Program Files (x86)\Microsoft Intune Management Extension\Policies\Scripts\xscddefr-2f0d-4148-80be-8bf7cca6fbf2_bc108d02-ac34-41c3-a072-deswdefr.ps1"
[Executor] created powershell with process id 5567
# And output IntuneManagementExtension.log
[PowerShell] Fail, the details are {"Version":1,"SigningCode":649,"SigningMsg":"(Success) AccountId:swdefr-d2af-4011-af4b-e234556b4560,PolicyId:bc108d02-ac34-41c3-a072-e16ys6stgeh,Type:1,Enforce: Audit. OSVersion:10.0.19043,AgentVersion:1.51.204.0. ","ExecutionMsg":"Powershell execution has exceeded defined timeout."}
# and the Start-Transcript you can see above
:(
Feb 21 2022 06:16 AM
Feb 21 2022 06:19 AM
Feb 21 2022 06:21 AM
Feb 21 2022 06:23 AM - edited Feb 21 2022 08:02 AM
Just uploaded it to intune, lets find out what the issue is
EDIT: very weird... I have altered almost the whole script... but it just doesn't get executed... I am beginning to guess whats wrong with it.. will update this post when I have the answer
Feb 21 2022 08:10 AM
Feb 21 2022 10:00 AM
Feb 21 2022 10:02 AM
Feb 22 2022 12:48 AM