Is there a way to launch powershell script from my UWP app ?
I have read that we have to use the FullTrustProcessLauncher class but I don't understand how to use/implement it.
Do you have any idea ?
Docs: https://learn.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.FullTrustProcessLauncher
Samples: https://github.com/Microsoft/DesktopBridgeToUWP-Samples/tree/master/Samples/AppServiceBridgeSample
https://github.com/Microsoft/DesktopBridgeToUWP-Samples/tree/master/Samples/SQLServer
In a nutshell, here is what you need to do:
1) add reference to the Desktop Extension SDK
2) declare the windows.FullTrustProcess extension in your manifest
3) (optional) declare an app service for communicating between your UWP and the fulltrust process
4) include a Win32 EXE in your package that will get launched from the FullTrustProcessLauncher API
5) that Win32 EXE can now invoke your powershell, etc.