Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rkyttle
Last active July 19, 2018 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rkyttle/c71edd95c99c8aa905cf1720a86a7730 to your computer and use it in GitHub Desktop.
Save rkyttle/c71edd95c99c8aa905cf1720a86a7730 to your computer and use it in GitHub Desktop.
Import-Module SpeculationControl
$scriptstring = Get-Content -Path (Get-Module SpeculationControl).Path | % { if (-not ($_ -match “^\# “)) { $_ }} | Out-String
$scriptstring += '
function Write-Host {}
'
$scriptstring += 'Get-SpeculationControlSettings'
$script=[scriptblock]::create($scriptstring)
Invoke-Command -ComputerName localhost, system2, system3 -ScriptBlock $script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment