Jump to content


  • 0
taylorblakeharris

New PowerShell Based SCCM OSD Frontend

Question

Hello everyone!

 

I'm brand new to PowerShell and SCCM but have been working to build my own frontend/GUI for SCCM's Operating System Deployment features in the Task Sequence Wizard inside of WinPE for my company. I wanted something elegant that was easy to implement and didn't require a lot of dependencies/libraries, but that was easy to customize and expand, and aesthetics were important too. That's why I decided to use XAML to utilize a WPF visual application and integrate it with PowerShell by reading the XAML into PowerShell and creating object variables for each object inside the XAML.The end result looks like this:

 

post-33947-0-39987300-1472048610.jpg

 

If any of you are interested in using this as a frontend or at least starting with it in your environment, please let me know and I'll provide anything I can to help you tailor it to your needs. I'm also open to suggestions from much more experienced users on ways to improve this.

 

Requirements:

In WinPE boot image:

-.NET Framework add-in

-PowerShell CmdLets add-in

 

That's really it!

 

Implementing the menu:

To implement the menu, simply add a new "Run PowerShell Script" step at the beginning of your Task Sequence and point it to the attached PowerShell ps1 file in this post. You may want to put it in a package and reference the package. The only other step is setting Task Sequence Variable conditions on each of your other steps that correspond with the variable names inside of the PowerShell script. The currently created task sequence variables are all defined in one section at the end of the code so you can change them/review them as needed to fit your environment. Here's a list of the current Task Sequence Variable declarations that correspond to the items you see in the above menu example:

 

$TSEnv.Value("OSDComputerName") = $HostNameBox.Text
$TSEnv.Value("ApplyBIOSSettings") = $BIOSCheckBox.IsChecked
$TSEnv.Value("EnableBitLocker") = $BitLockerCheckBox.IsChecked
$TSEnv.Value("SendDeploymentEmail") = $SendEmailCheckBox.IsChecked
$TSEnv.Value("InstallVPN") = $VPNCheckBox.IsChecked
$TSEnv.Value("InstallFlash") = $FlashCheckBox.IsChecked
$TSEnv.Value("InstallReader") = $ReaderCheckBox.IsChecked
$TSEnv.Value("InstallJava") = $JavaCheckBox.IsChecked
$TSEnv.Value("InstallBloomberg") = $BloombergCheckBox.IsChecked
$TSEnv.Value("InstallAcctSys") = $AcctSysCheckBox.IsChecked
$TSEnv.Value("InstallMarketAxess") = $MarketAxessCheckBox.IsChecked
$TSEnv.Value("InstallTradeweb") = $TradewebCheckBox.IsChecked

 

Customizing it for yourself:

The entirety of the graphical element of this menu is simply a here-string of XAML stored in one variable!! To make changes to the graphical components of this menu, you can simply open the XAML contained in the $InputXAML variable into Visual Studio and design away. Simply paste your updated XAML code from Visual Studio back into the PowerShell script file between the @" "@ symbols of $InputXAML and you're ready to go!. Keep in mind, if you add new objects and controls to the XAML, such as a new CheckBox, drop-down, etc, you'll want to make sure to create a corresponding task sequence variable at the end of the script to set a TS variable to hold the user selected option for that control.

 

For example:

If you add a new XAML check box and name it "CheckBox1", like so:

<CheckBox x:Name="CheckBox1" Content="CheckBox1 Label Here"/>

You'll want to create a new Task Sequence variable to hold the result of that checkbox object, like so:

 

$TSEnv.Value("CheckBox1WasChecked") = $CheckBox1.IsChecked

Now you can reference "CheckBox1WasChecked" within your task sequence to determine whether or not to run a certain step!

 

 

 

 

 

Let me know what you think!

 

**NOTE** To test the appearance of the menu and interact with it, you can simply run the PowerShell file and it will work just fine (aside from a few initial errors returned from the PS console if you're outside of a task sequence environment, such as on your desktop). If you click the "Exit" button though, it will restart your computer!! So right-click on the taskbar icon for the app and click "Close" instead of using the button. I removed the window border and normal window buttons (close, minimize, etc) because I thought the borderless made more sense for a task sequence environment and looked sleeker with a customized company logo wallpaper.

 

The script file is attached in the ZIP below:

DeploymentMenu.zip

Edited by taylorblakeharris
  • Like 1

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hey, looks great. I am in the process of making one myself here but lack of time is getting in the way. My intention is to have it more dynamic so it will read the site server and get any of the active 3rd party applications and add them to the list. I did this at my last job using a HTA but I want to convert to PowerShell (and due to various privacy laws I wasn't allowed to take the code with me when I left)

Share this post


Link to post
Share on other sites

  • 0

Hey, looks great. I am in the process of making one myself here but lack of time is getting in the way. My intention is to have it more dynamic so it will read the site server and get any of the active 3rd party applications and add them to the list. I did this at my last job using a HTA but I want to convert to PowerShell (and due to various privacy laws I wasn't allowed to take the code with me when I left)

That's intellectual property for you!!

 

I started looking at HTA's initially but they're too messy for me... I'm also not much of an HTML person either and I couldn't find any good software for designing the HTML interface that I could find directly compatible with an HTA "document" so I just went with Visual Studio for designing the interface and copied and pasted the code into a single variable in PowerShell and with .NET loaded, that's all you need! No other files, or libraries, or scripts or assemblies necessary. just one, compact PS1 file you can throw into a task sequence step.

 

The only thing I'm trying to figure out is how to use relative paths to resources, like a JPG for a logo, for example, inside of the XAML. If I put an absolute path to a logo file on a mapped network drive, and map the drive just before the script step runs for the menu in the task sequence, the logo will show up. But I can't put a relative path in the img source field of the XML. It won't work. If I put the PNG file in the same package as the script and set the image source as 'logo.png' or '/logo.png' I can't get the image to show up. Any ideas?

Share this post


Link to post
Share on other sites

  • 0

That's intellectual property for you!!

 

I started looking at HTA's initially but they're too messy for me... I'm also not much of an HTML person either and I couldn't find any good software for designing the HTML interface that I could find directly compatible with an HTA "document" so I just went with Visual Studio for designing the interface and copied and pasted the code into a single variable in PowerShell and with .NET loaded, that's all you need! No other files, or libraries, or scripts or assemblies necessary. just one, compact PS1 file you can throw into a task sequence step.

 

The only thing I'm trying to figure out is how to use relative paths to resources, like a JPG for a logo, for example, inside of the XAML. If I put an absolute path to a logo file on a mapped network drive, and map the drive just before the script step runs for the menu in the task sequence, the logo will show up. But I can't put a relative path in the img source field of the XML. It won't work. If I put the PNG file in the same package as the script and set the image source as 'logo.png' or '/logo.png' I can't get the image to show up. Any ideas?

 

It might be my intellectual property but it was designed and built on their hardware on their time so they own it. We have interesting laws here.

 

I haven't looked much into using XMLs (it's on the ever growing list) but could you use Base64 for the image and reference that. For example in the PowerShell have

$picturebox1.Image = [System.Convert]::FromBase64String('iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAEn5JREFU
aEPdmXd0VNW+xwcSqlQREKR3RJqAqCD2Xt69+uyKvVL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+BeBkCJlBXJ9CzSCuu/FCVd1xk6Ziq7EZGdstzdEZIy2WB/YMHnw0hurRpFGTQs2YMAO4
MUBcfQg1BWg8AxsAs4fTMIkFDGdbxNumZWCBbta5JwECHgCA1ZafxcopY+BkFmIWnjJCB595QKmj
Rhztia3G5nrbA45oiUYsat5s7aEbrtf2SZO1jrLAZKWGOcCEkBnEZgyYEDJjIAWZ8DE533jAlBAm
5zeUECcLOANA2exle8RLAVfWoU1gl6G8K4t1FulmvXvCC9T+zAGVLFqqGAfV46lCJwwOpNH9Lz6m
2ntuF2t3AsQyot7mk38RmP+buuKPm39r18Z6+Nb/kuP+qYqhpo+iTIimHortfKbiUCJKRqkoHdlR
JnKgHJSHXMiNClExKu3cRV6KQ2+P7irr3VPl/XvLN7iffMMHquK8IfKPGS7/+PNUOXGkqiaNUdWU
caq+fIJqr5+sPY/eqUML5mjP3f+tt8PCrMbG+vg/5T+yBi8M4MOd81qHb6qcOPbg/oemskM2XVUz
pqkG1aLdfN+D6tA+tB8dQAfRIXSYe46gY0bTp0nTn5amIXPkup6ZIT2Lnp8pvfCM9OKz0kvPSbOe
l2a/IL36kvTay9Lc2dLrs3Tk0QflGD704GMWC0nRwh9JFmOjiZiQrTVnB6Lr+1ksc2e0a73mu95d
MxYP6OVYMqiXY/HgPo4lQ/o6lgxtpGGNPptr5h7uXWJ+0/8cx5J+PR1L+/RwLO3VzbG0Jzr7LMfS
bl0cS7t0cizt1NGxtGN7x9K2bR2L0bfoK/Q5+hR9EB6ewa75mrOxxdhUb5ux8Q9bC66a/59Go6vR
bYh/oP4SmXcbG4wtxiZj259qJr5aoU6oOzrnL5J5t7HB2BIU83+GxKRYQ21i7q+Qebex4bTtfwBd
yOl5co93qgAAAABJRU5ErkJggg==')

That will give you a shutdown button. You can use various websites to do the encoding you just need to have the image the size that you want it before you encode it.

Share this post


Link to post
Share on other sites

  • 0

 

It might be my intellectual property but it was designed and built on their hardware on their time so they own it. We have interesting laws here.

 

I haven't looked much into using XMLs (it's on the ever growing list) but could you use Base64 for the image and reference that. For example in the PowerShell have

$picturebox1.Image = [System.Convert]::FromBase64String('iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAEn5JREFU
aEPdmXd0VNW+xwcSqlQREKR3RJqAqCD2Xt69+uyKvVLsgqJcsCBiu/YKiF71KkU6oSQhIb3MTJIJ
SWYyyaRMMpk0IPT2fZ89JNyQGXyu949rvb3Wd52Zc86c8/vs32//9m/vsVj+v7ZJFsvN88eOXbbs
4Ycdv778stPot1mznMtnz3Yuf+UV5/JXX3UunzPHufL1150r5851rjKaN8/5u9H8+c7Vb77pXP3W
W841b7/tXLNggXOt0TvvONcuXBjQ+kWLnOvfe8+5/v33T+iDD/5z5PMGtGLWLMfCyy5bNiks7OY/
3c9nWiy95o0cuTZv8WJVZ2WpxuVSLdrldmt3QYH2eDyqKyrS3pIS7Sst1f6yMh0oL9fBigod9Pt1
qKpKR6qrdaSmRkd37dKx3bt1rK5Ox/fulfbtk/bvlw4ckA4elA4flo4ckY4elY4fP6EQrTY5WYuu
vHKtse0PQcwN30yZklUSGan8HTtk/+03pS5dqlRg0jlav/9e1mXLZP/hB2X8+KMy//UvZf30kxw/
/6zsX37Rzn//Wzt//VW5/C5v+XLlrVgh58qVcq1aJdfvvyt/9Wq516yRe+1aFaxbp4L161WwYYMK
N25U4aZNKoyIkGfzZnm2bAmoODpaFVarDtIJBvqXqVOz2vwBRPhLffuudvHidAyK/fBD7fjgA8V9
9JESPv5YiSjp00+VjFI++0xpn3+utC++UPqXX8r21Veyf/21MlDmN98o89tv5fjuO2UvWaKdgAcE
fA7wucDnAp8HvNOIDnAC7wLeBbwL+HxsMHa4TAdwzAe+kmg4jnfnjh+/Gi+EB3liiMVyXfS0aUqh
t6MXLFDsokXa8d57inv/fSUAkghQE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75mrOxxdhUb5ux8Q9bC66a/59Go6vR
bYh/oP4SmXcbG4wtxiZj259qJr5aoU6oOzrnL5J5t7HB2BIU83+GxKRYQ21i7q+Qebex4bTtfwBd
yOl5co93qgAAAABJRU5ErkJggg==')

That will give you a shutdown button. You can use various websites to do the encoding you just need to have the image the size that you want it before you encode it.

Oh wow that's cool.... I didn't even consider that. It's kind of a big deal I get it working because if for some reason connecting to the network share with the image fails, the powershell script will not launch the menu and the task sequence step will therefore complete and move on to the next which is partitioning the hard drive! Hopefully most of my colleagues that will be using this know before they select the task sequence that they want to wipe the drive but I have a warning/confirmation in the menu anyways, just in case.

Share this post


Link to post
Share on other sites

  • 0

Did you consider having the frontend create a variable such as 'ValidBuild' = True or something when you click 'Begin'? After that just add a step after the script but before the format to run a command line that is designed to fail the task sequence but set its options to only run if 'ValidBuild' is not True. That way if the script does fail the whole TS will fail and not format the disk.

Share this post


Link to post
Share on other sites

  • 0

Did you consider having the frontend create a variable such as 'ValidBuild' = True or something when you click 'Begin'? After that just add a step after the script but before the format to run a command line that is designed to fail the task sequence but set its options to only run if 'ValidBuild' is not True. That way if the script does fail the whole TS will fail and not format the disk.

That's a good idea. I'm just going to do a "run command line" step that runs only if ExitTaskSequence notequals "false" that runs a batch file displaying a WShell popup saying that the menu exited incorrectly and then running a fake command at the end that will throw an "incorrect function" error. Good idea. Thanks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.