Forum Discussion
Get-WUHistory freezes
Me too face the same problem, observes this in our env too... Did you find any solution ?
Thx, Vasu
- mscottfordDec 18, 2020Copper Contributor
VasuWindows I ran into this as well. I went searching for the source code for the https://www.powershellgallery.com/packages/PSWindowsUpdate/2.0.0.4 module but I could not find a reliable source for that. Instead, I attached a debugger and tried to figure out what was going on. It looks like there's an infinite loop when the -Last parameter is not specified. So I'm working around this problem by making sure I specify -Last 100. The command reliably stops in that case.
Here's a full example for clarity:
Get-WUHistory -MaxDate (Get-Date).AddDays(-30) -Last 100I wish that this module's source code was hosted somewhere like GitHub because then I would be able to dig in deeper and hopefully provide a root cause fix to the problem.
- VasuWindowsJan 04, 2021Copper Contributor
Thansk much, it worked like charm . Great job mscottford
- srbishbDec 31, 2020Copper Contributor