Question:
Okay, so I’m in the process of writing out a script, and I’m at a point where I want to count the number of updates installed in the last day or so. I’m using Get-CIMInstance because the get-wuhistory command outputs dates in a weird format. So, here’s the crux of my problem.
Here’s the unfiltered output:
So, when I run the following, I get nothing, no error, no output, it just kicks to another prompt.
What am I missing here? I’ve got to be overlooking something simple, but I’ve wracked my brain and can’t seem to figure it out.
Answer:
This can be done using Get-Hotifx.
or if you want to use Get-GmiInstance, try this.
Note – As others mentioned in the comments, you need to make sure that at least one update exists which got installed in the last two days. Else, you will not get any result. I did tested the below commandlets on my machine and works well.
If you have better answer, please add a comment about this, thank you!