rzander / sccmclictr

Client Center for Configuration Manager
Microsoft Public License
321 stars 59 forks source link

Notify-UserOfReboot not working #127

Closed pilgi3 closed 4 years ago

pilgi3 commented 5 years ago

When i connected and click "Notify-UserOfReboot" the Client Center hangs. The client get no message! image

russr123 commented 5 years ago

this is the basis for the script, https://www.itninja.com/blog/view/reboot-required-toast-notifications-for-windows-machines

the thing is, if you open a PS window and paste it in and run it, it works, every time i try to get it to run any other way, it wont.

pilgi3 commented 5 years ago

I tried on my test clients and yes you are right. Works local but not remote ...

rzander commented 4 years ago

changed it to:

Set-Location (Get-ItemProperty("HKLM:\SOFTWARE\Microsoft\SMS\Client\Configuration\Client Properties")).$("Local SMS Path")
.\SCToastNotification.exe "Notice: Pending Reboot Needed" "Your PC Needs to restart as soon as you can."
msg * "Notice: Pending Reboot Needed...." "Your PC Needs to restart as soon as you can."