Skip to content

Instantly share code, notes, and snippets.

@AspenForester
Created December 23, 2019 19:04
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 AspenForester/336637ef851c37c2ed904cda1928a118 to your computer and use it in GitHub Desktop.
Save AspenForester/336637ef851c37c2ed904cda1928a118 to your computer and use it in GitHub Desktop.
Thoughts for Brandon Mac
$Computers = $env:COMPUTERNAME
$sccm = Foreach ($computer in $Computers)
{
If (Test-Connection -ComputerName $Computer -count 1 -Quiet)
{
Get-WmiObject -Class CCM_SoftwareUpdate -Filter ComplianceState=0 -Namespace root\CCM\ClientSDK -Computername $Computer |
Select-object @{N='Computername';E={$_.PSComputerName}},ArticleID,Name, URL
}
}
$sccm
$sccm | Out-Gridview
$sccm | export-csv -path c:\temp\sccm.csv -notypeinfo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment