Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save johnjohnsp1/ae5aa32bdd79d17ca310 to your computer and use it in GitHub Desktop.

Select an option

Save johnjohnsp1/ae5aa32bdd79d17ca310 to your computer and use it in GitHub Desktop.
September Scripting Games puzzle solution. One line, no semicolons, no curly braces.
Import-Csv .\input.csv | Add-Member -MemberType ScriptProperty -Name 'OSVersion' -Value $([scriptblock]::create('(Get-WmiObject Win32_OperatingSystem -ComputerName $this.MachineName).caption' )) -PassThru | Export-Csv output.csv -NoTypeInformation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment