Forum Discussion
elvys_marchon
Feb 04, 2022Copper Contributor
Help deploy a powershell script to install speculation module
Hi folks, I need help checking the status "Speculation Execution Side-Channel Vulnerabilities". I use the document "https://support.microsoft.com/en-us/topic/understanding-get-speculationcontrol...
Feb 21, 2022
Still no transcript log containing the steps from your script? Weird...
elvys_marchon
Feb 21, 2022Copper Contributor
I reinforce that this behavior only occurs when it is running through Intune, if I run the local script, everything works fine
- Sriram10069Dec 13, 2022Copper Contributor
elvys_marchon I am reading this thread now and typically facing the same problem now. The script modified by you is deployed via Intune to other desktops? was it successful?
- elvys_marchonFeb 22, 2022Copper Contributor
Hi Rudy_Ooms_MVP ,
yep, I did the test now and it ran successfully in my test environment. I'm waiting to see in other desktops.
- Feb 22, 2022Did you already had time to test it?
- Feb 21, 2022Altered it a bit as you could notice. I also added some additional testfiles to know at which stage it broke/timeout
My money is on this line:
Set-Variable -Name 'ConfirmPreference' -Value 'None' -Scope Global
Uploaded the script above to my test tenant and in the programdata the output is saved.. - Feb 21, 2022if (Get-PackageProvider -ListAvailable -Name NuGet)
{
Write-Host "Module exists"
}else
{
Install-PackageProvider "NuGet" -MinimumVersion 2.8 -Force | Out-Null
}
if (Get-Module -ListAvailable -Name SpeculationControl)
{
Write-Host "Module exists"
Import-Module SpeculationControl
New-Item -Path c:\programdata -Name "testfile2.txt" -ItemType "file" -Value "PassedRound1."
Get-SpeculationControlSettings | Out-File -FilePath c:\ProgramData\speculationcontrol.txt
}else
{
Install-module -Name SpeculationControl -force
Import-Module SpeculationControl
New-Item -Path c:\programdata -Name "testfile3.txt" -ItemType "file" -Value "PassedRound1b."
Get-SpeculationControlSettings | Out-File -FilePath c:\ProgramData\speculationcontrol.txt
}
New-Item -Path c:\programdata -Name "testfile4.txt" -ItemType "file" -Value "PassedAll." - elvys_marchonFeb 21, 2022Copper Contributor
- Feb 21, 2022
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