bcwilhite / PendingReboot

Module to detect Windows OS pending reboots
MIT License
125 stars 26 forks source link

Have you seen this one on your Pending Reboot PSD1 #1

Closed kquinn64 closed 5 years ago

kquinn64 commented 5 years ago

I have an issue maybe you can shed some light on... I have many different versions of PS so I think the best way to get this deployed to 10k+ machines is to copy the files and then run a import-module on it. But when I copy the folder to the powershell module location and try to run the psd1 I get a

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

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

bcwilhite commented 5 years ago

kquinn64, if you're not running the build script and creating the module from the GitHub clone, install it from the PSGallery instead. You can find that information here: https://www.powershellgallery.com/packages/PendingReboot/0.9.0.6 or you can install it via PowerShell with Install-Module: Install-Module -Name PendingReboot When you have the published and/or "built" module, the files / folders are created correctly. You can then move that folder to a PowerShell module location and it will work.