Using PS build exe in SCCM OS builds

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 7 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
Lembasts
Posts: 405
Last visit: Wed Mar 27, 2024 4:25 pm
Has voted: 1 time
Been upvoted: 1 time

Using PS build exe in SCCM OS builds

Post by Lembasts »

Greetings,
I was wondering if I could create a powershell studio form based exe and launch it in an SCCM OS build task sequence to ask questions etc?
If so, are there any tricks or limitations?
I ask this as we have a contractor who is doing an SCCM build and his powershell code is full of New-Object System.Windows.Forms.xxxx and I thought it would be easier in PS.

Thanks
David
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Using PS build exe in SCCM OS builds

Post by jvierra »

You would have to test your EXE. SCCM shares data with PowerShell scripts. It cannot share data with an EXE. That would be a limitation.
I recommend post in in SCM forum for information on what can be shared with an EXE.

With PSS you do not need to create an EXE. You can just save the form as a PS1 and it would have access.
This topic is 7 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked