bcwilhite / pendingreboot Goto Github PK
View Code? Open in Web Editor NEWModule to detect Windows OS pending reboots
License: MIT License
Module to detect Windows OS pending reboots
License: MIT License
Hi Brian! As far as I know, WMI cmdlets are considered deprecated. Do you think it's worth to switch to CIM cmdlets? Or implement both and let users to choose which one to use via a switch parameter?
Hello - it seems on PowerShell 2 and 3 (haven't tested 4) that we get a popup asking for credentials even if we don't specify that parameter (just the Test-PendingReboot function without any parameters). I've commented out the parameter to bypass this, just wondering if you knew about it or if any other fix was available.
Import-LocalizedData : Cannot find the Windows PowerShell data file 'PendingReboot.strings.psd1' in directory 'C:\Program
Files\WindowsPowerShell\Modules\PendingReboot\Private\Docs\en-US\en-US', or in any parent culture directories.
At C:\Program Files\WindowsPowerShell\Modules\PendingReboot\Private_localizationHeader.ps1:1 char:25
+ CategoryInfo : ObjectNotFound: (C:\Program File...ot.strings.psd1:String) [Import-LocalizedData], PSInvalidOperationException
+ FullyQualifiedErrorId : ImportLocalizedData,Microsoft.PowerShell.Commands.ImportLocalizedData
What I see is in the path for the import-localizeddata it shows a path which included en-us\en-us (twice) so I have looked in all the files that are apparent to see if there is something in a path that is an issue but coming up blank... any pointers>
Interestingly enough I have found if I run the Import-Module manually 2 times it will work the second time but I am trying to get this to work in a SCCM TS and in that it doesn't work if I run it twice :)
Thanks
This case does not seem to be handled.
I have done the research on how to detect it, but it is based on greping file contents or running Uninstall-feature against something innocuous.
I'm not sure if that is in scope for this code since everything in it is currently doable by remote registry calls.
Can you please comment on approach and I will know whether I have the time to do a pull request.
Hello,
First thanks for this tool it is helpful. I may not be able to use it though. I am not sure if this is by design or not, but AFTER windows update on a windows server 2016 enterprise when I run Test-PendingReboot I get different results when I run in PS x86 compared to the 64bit version. the PS x86 is wrong.
Hi.
Get-DscLocalConfigurationManager
may return the property LCMState
with a value PendingReboot
which may indicate that a reboot is pending.
https://docs.microsoft.com/en-us/powershell/module/psdesiredstateconfiguration/get-dsclocalconfigurationmanager
Thank you.
When running the get-help. It would be nice to see the syntax examples. It would also be nice to have more detail listed.
Running Test-PendingReboot
in Powershell 7.1.0 returns
The term 'Invoke-WmiMethod' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Hi.
I found an article that indicates another registry key that determines if a modification to an EXE is pending that's missing from this module:
https://scriptingetc.wordpress.com/2017/06/16/detect-pending-reboots/
Pending EXE Modification
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\UpdateExeVolatile Any non-zero value indicates a pending reboot
More information can be found here:
http://support.microsoft.com/kb/832475
The registry key should probably also be checked:
HKLM\SOFTWARE\Wow6432Node\Microsoft\Updates\UpdateExeVolatile
Thank you.
Hi,
Could you please add checking for the following registry key:
HKLM:Software\Microsoft\ServerManager, CurrentRebootAttempts
Thanks,
Will
hi,
i'd like to report a small bug i have. PendingComputerRenameDomainJoin
is always $true
for my notebook, for some reason unknown to me. nothing is pending in reality.
here's some info:
> get-module PendingReboot
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 0.9.0.6 PendingReboot Test-PendingReboot
> $PSVersionTable
Name Value
---- -----
PSVersion 7.3.6
PSEdition Core
GitCommitId 7.3.6
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.