Understanding Get-SpeculationControlSettings PowerShell script output



  • Colby Bouma

    Here's what I did:

    # Navigate to the Repository in PowerShell (I'm using the default Repository path).
    cd 'C:\users\Public\Documents\Admin Arsenal\PDQ Deploy\Repository'
    # Create a "Custom" folder.
    # I like to put custom items in here because it's easier to exclude them from the Repository Cleanup.
    New-Item -ItemType "Directory" -Name "Custom"
    cd '.\Custom'
    # Save the SpeculationControl module.
    # You'll have to update the version number if it changes.
    Save-Module -Name "SpeculationControl" -Path .
    cd '.\SpeculationControl\1.0.14'
    # Create the script that Deploy will use.
    $ScriptText = @'
    Import-Module .\SpeculationControl.psd1
    Out-File -InputObject $ScriptText -FilePath '.\PDQ Deploy Step.ps1'

    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.

    Comment actions Permalink
  • William Zilinek

    Thank you, Colby. That worked nicely.
    I never would have gotten there myself.

    Comment actions Permalink

Please sign in to leave a comment.