Understanding Get-SpeculationControlSettings PowerShell script output
I'm fairly new to Powershell, so I just ran into something that is beyond my current capabilities....
Microsoft has a web page (https://support.microsoft.com/en-us/help/4074629/understanding-the-output-of-get-speculationcontrolsettings-powershell) that provides a Powershell script that will show what aspects of Spectre/Meltdown/MDS a machine in vulnerable to. The script, however, expects to be run interactively.
I tried just sending it to a test machine with Deploy, but it returned the error:
Exception calling "ShouldContinue" with "2" argument(s): "Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available." At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7455 char:8
-
if($Force -or $psCmdlet.ShouldContinue($shouldContinueQueryMessag ... -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
- FullyQualifiedErrorId : PSInvalidOperationException
Has anyone succeeded in converting Microsoft's script into something that Deploy can send, and where we can get meaningful data back?
Comments
Here's what I did:
Now create a Deploy package with an Install Step pointing to
$(Repository)\Custom\SpeculationControl\1.0.14\PDQ Deploy Step.ps1.Make sure to enable the "Include Entire Directory" checkbox.
Thank you, Colby. That worked nicely.
I never would have gotten there myself.