Skip to content

Instantly share code, notes, and snippets.

@ProgrammingWithHandGrenades
Created September 7, 2015 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ProgrammingWithHandGrenades/0a9b13e36b5176e18c85 to your computer and use it in GitHub Desktop.
Save ProgrammingWithHandGrenades/0a9b13e36b5176e18c85 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