• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How would I disaply only the last two days of windows updates in powershell?

Resolved: How would I disaply only the last two days of windows updates in powershell?

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

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!

powershell
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: In Bigquery How iterate the records as per counter in the table

27/03/2023

Resolved: Java Swing center JLabel in JPanel with two JLabels

27/03/2023

Resolved: How to compare two text files and and change the sign of the data in powershell?

27/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.