Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, July 30, 2018 8:32 AM
Hello,
I have a PowerShell Script that is updating BIOS' on a number of devices. I'm trying to get the System run PowerShell Script to message the logged in user however anything I try is failing to run.
Does anyone have any ideas?
All replies (4)
Monday, July 30, 2018 8:40 AM
Hi,
You can use the PresentationFramework to show a Message Box on a user's device. However, this only works if you run the PowerShell Script from Intune in user context, this will not work in system context.
To present the user with a Message Box, review the code below.
Add-Type -AssemblyName PresentationFramework
[System.Windows.MessageBox]::Show('Hello world!')
If the script has to be run in System context, you will have to find a method to start a new process in User context from that script, and add a Message Box from there.
Monday, July 30, 2018 10:07 AM
Hi,
Thanks for your information.
After assign the powershell acript, could you please restart Microsoft Intune Management Extension service on a windows device:
For more detailed steps, please read the following article:
https://www.windows-noob.com/forums/topic/16014-how-can-i-send-notification-messages-using-powershell-in-microsoft-intune/
Best regards,
Johnson
=====================
Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact [email protected].
Monday, July 30, 2018 10:35 AM
Hello,
Not sure what you mean here? The Script is running in the System Context and installing the BIOS updates correctly, I just can't seem to initiate a message to the user that it's completed and they need to restart their device.
Monday, July 30, 2018 1:19 PM
Things that run as local System, like the Intune management extension agent display their UI on the hidden session 0 desktop. There is no built in way for them to show UI to the interactive user as this would violate a hard security boundary.
With ConfigMgr, there is an older tool, ServiceUI, that folks use to sidestep this boundary. If this .exe already existed on the target system(s) you could use it to inject the UI onto the interactive desktop.
Jason | https://home.configmgrftw.com | @jasonsandys