PowerShell Information for Meltdown and Spectre

By | January 6, 2018

Microsoft released few updates and instructions about Intel security flaw, one of the instructions is to check if your machine is vulnerable with PowerShell command.

The SpeculationControl module can be installed from the PowerShell Gallery with Install-Module which is part of the PowerShellGet module that ships natively with PowerShell version 5.0, but can be installed on PowerShell version 3.0 and higher.

Install-Module SpeculationControl

image

Running the command Get-SpeculationControlSettings contained in the SpeculationControl module is require the script execution policy to be set to Bypass.

image

This mode doesn’t have any option to run remotely therefore we need to use additional parameter such Invoke

Invoke-Command -ComputerName LABFE01 -ScriptBlock {Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force;Install-Module SpeculationControl -F
orce}

image

To collect information from your Windows server and Windows client you can download the MeltdownSpectreReport.ps1 and run with the following command
$ComputerName = Get-ADComputer -Filter * | Select-Object -ExpandProperty Name $Report = MeltdownSpectreReport.ps1 -ComputerName $ComputerName $Report | ConvertTo-Csv -NoTypeInformation -Delimiter ‘,’ | Out-File C:\report.csv    $Report | Out-GridView

Note: The command Get-SpeculationControlSettings function uses the Get-WMIObject cmdlet so it’s not compatible with PowerShell Core.

(Visited 186 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *