Skip to content

Instantly share code, notes, and snippets.

View wpietrzakpl's full-sized avatar

Wojtek Pietrzak wpietrzakpl

View GitHub Profile
$Monitor = Get-WmiObject -Class wmiMonitorID -Namespace root\wmi
$Computer = Get-WmiObject -Class Win32_ComputerSystem -Namespace root\cimv2
foreach ($m in $Monitor) {
$PSObject = [PSCustomObject]@{
ComputerName = $env:COMPUTERNAME
ComputerType = $Computer.Model
ComputerSerial = $Computer.Name
MonitorSerial = ($Monitor.SerialNumberID -ne 0) -join ""
<#
.SYNOPSIS
Iron Scripter Challenge v2
.DESCRIPTION
Iron Scripter v2
.EXAMPLE
PS C:\Users\Wojtek\Documents\WindowsPowerShell> . .\Iron-Scripter_2.ps1
PS C:\Users\Wojtek\Documents\WindowsPowerShell> Iron-Scripter
cmdlet Iron-Scripter at command pipeline position 1
<#
.SYNOPSIS
Iron Scripter v3
.DESCRIPTION
https://cdn-powershell.pressidium.com/wp-content/uploads/2018/01/Iron-Scripter-Prequel-Puzzle-3.pdf
.EXAMPLE
PS C:\Users\Wojtek\Documents\WindowsPowerShell> .\Iron-Scripter_3.ps1
0 - Help us Recognize Amazing PowerShell Contributors!
1 - Distilling Microsoft's DSC Update (Jan 2018)
2 - PowerShell Story Continued Becoming a Craftsman
<#
.SYNOPSIS
Script install FusionInventoryAgent
.DESCRIPTION
Script install FusionInventoryAgent
.EXAMPLE
PS C:\> <example usage>
Explanation of what the example does
.INPUTS
Inputs (if any)