In a recent release of HPCMSL, an additional function was added, Invoke-HPNotification. This function is an iteration of the Invoke-HPRebootNotification function. Both functions have been updated to include additional customizations that you can now use in your own processes.
HP Developers Portal | Invoke-HPNotification
By default, it will use HP Logo, and HP TitleBarHeader, but this is customizable via parameters. Let's quick run the function with no parameters.
Since both Title & Message are required, it prompted, so I added very simple text for the example. In this example you can now see the TitleBarIcon & TitleBarHeader, which are defaulted to HP Logo and HP System Notification.
Let's grab a .png file and use that for the Icon, and modify a couple more options
Invoke-HPNotification -TitleBarIcon "C:\Users\GaryBlok\Downloads\OMENIcon.png" -Title "Hello" -Message "Thanks for checking out my blog post" -TitleBarHeader "HP Dev Notification Demo"
From this example, you can see the Icon changed, and so did the TitleBarHeader.
But that Icon is small, and you can't even tell it's for our company, lets get more creative and add a Logo.
Invoke-HPNotification -TitleBarIcon "C:\Users\GaryBlok\Downloads\OMENIcon.png" -Title "Hello" -Message "Thanks for checking out my blog post" -TitleBarHeader "HP Dev Notification Demo" -LogoImage "C:\Users\GaryBlok\Downloads\OMENLogo.png"
Alright, that's looking pretty nice, and it's all done with a simple function provided by HPCMSL.
So this is great and all, but what if you use this in your process, and you want to have the toast have a button for reboot? No problem... there's a function for that.
For this example, I'm not going to change anything, other than the function being called:
Invoke-HPRebootNotification -TitleBarIcon "C:\Users\GaryBlok\Downloads\OMENIcon.png" -Title "Hello" -Message "Thanks for checking out my blog post" -TitleBarHeader "HP Dev Notification Demo" -LogoImage "C:\Users\GaryBlok\Downloads\OMENLogo.png"
You can see it's identical, but it adds the "Reboot now" button, which when pressed will cause the device to reboot.
We do have plans to add additional controls around the toast notifications in the future, but no ETA yet.
And yes, this works on non-HP devices as well. You're more than welcome to install HPCMSL on other devices to leverage these functions.