Ok so first is first..
thank you @Brandon in this thread https://www.symantec.com/connect/forums/meltdown-p...
which he recommends custom inventory from here https://www.symantec.com/connect/forums/invaexosqu...
This works... for windows 7. Works great... BUT Windows 10 and other Server O/S - it wont work.
During my searching I hit this article... http://www.thewindowsclub.com/check-windows-update...
Now it is awesome.. the top part didnt bring all i needed but if you follow down farther... he has code to query the update history. This is great...
I ran it but it didnt go back far enough so I changed his 0,50 to 0,550 and now the patch shows!!!!
2018-01 Cumulative Update for Windows 10 Version 1607 for x64-based Systems (KB4056890)
so.. now the help I need...
How does one take a powershell script and create variables that can be then inventoried in via Altiris?
I have done custom inventories but always using vbs to query registry, etc...
Any guidance on this as I bet it will help many others!!!!
****************************
try it - put the following into powershell ise
****************************
{param( [Parameter(Mandatory=$true)]
[int] $ResultCode)
$Result = $ResultCode
switch($ResultCode)
{2
{$Result = "Succeeded"}
3
{$Result = "Succeeded With Errors"}
4
{$Result = "Failed"}}
return $Result}
function Get-WuaHistory
{
# Get a WUA Session
$session = (New-Object -ComObject 'Microsoft.Update.Session')
# Query the latest 1000 History starting with the first recordp
$history = $session.QueryHistory("",0,550) | ForEach-Object {
$Result = Convert-WuaResultCodeToName -ResultCode $_.ResultCode
# Make the properties hidden in com properties visible.
$_ | Add-Member -MemberType NoteProperty -Value $Result -Name Result
$Product = $_.Categories | Where-Object {$_.Type -eq 'Product'} | Select-Object -First 1 -ExpandProperty Name
$_ | Add-Member -MemberType NoteProperty -Value $_.UpdateIdentity.UpdateId -Name UpdateId
$_ | Add-Member -MemberType NoteProperty -Value $_.UpdateIdentity.RevisionNumber -Name RevisionNumber
$_ | Add-Member -MemberType NoteProperty -Value $Product -Name Product -PassThru
Write-Output $_}
#Remove null records and only return the fields we want
$history |
Where-Object {![String]::IsNullOrWhiteSpace($_.title)} |
Select-Object Result, Date, Title, SupportUrl, Product, UpdateId, RevisionNumber}
Then run this...
Get-WuaHistory | Format-Table