-
Notifications
You must be signed in to change notification settings - Fork 3
Home
(This is slightly outdated. I need to upload new screenshots. Resources\ReadMe.docx is current.)
-
Microsoft PowerShell 4.0+
-
Active Directory and Configuration Manager modules, which are included automatically if both AdminTools and Configuration Manager are installed. Note: The SCCM cmdlet library may get updated by Microsoft, in which commands within the script may become deprecated or could no longer function.
-
Packages must follow a certain naming convention such as "Manufacturer_Product_Version". They must exist in a folder of that name under the Source Path that is configured in the tool. For instance, \Sourcepath\PackageName.
- MECMAddAppTool.ps1
- MECMAddAppSettings.xml (will be generated by the tool)
- LICENSE.txt
- MECMAddAppTool.ico
To run the tool, simply use the bat file. It is just a clickable way to launch powershell.exe and pass in the script file. Alternatively, you can right-click the ps1 file and select “Run with PowerShell”.
The tool must be run with an account that has access to make modifications to the relevant areas of both Active Directory and MECM.
It may take a moment before the interface loads. This is normal.
If you have any issues running the tool; for instance, if nothing happens at all, it may be due to Execution Policy. This may be managed in your environment. For more information, please research “PowerShell Execution Policy”. You may also run using the Debug.bat file to confirm, as that will leave the console window open to view any error messages.
All custom settings are stored in a settings XML. This is so the (ps1) script does not have to be modified to define specifics for the site. The settings XML can be created and modified using the tool interface. If the file does not exist, it will automatically prompt you to create one. This will be stored in the directory relevant to the ps1 if you have write access there. Otherwise, it will write to %appdata%.
After these are set, they will remain consistent for all packages created for the site.
Interface:
Enter the package name in the textbox. Must be in the format shown. The delimiter (In this case “-”) may be different depending on the entry in the settings XML. | |
Define which options you would like the tool to create or Select All to create all. Outdated. Tool no longer provides option to create Packages. |
|
Choose a Deployment type option.
|
|
The Source folder will be pulled from the Settings XML + the Package name. The source files must be located in or under this location. When selecting MSI type, the top box will be for the MSI. The 2nd box for the MST. When selecting AppV5, the top box will be for the AppV. When selecting Script, the top box will be for the Install command. The 2nd box will be for the Uninstall command. This will prepopulate with settings from the XML file. Browse allows you to navigate to a file. |
|
Outdated. 2.11.1 version now includes more robust detection options. | |
This displays current Admin categories pulled from SCCM. Any or multiple can be selected for the App. New button dynamically creates a new category in SCCM and will display it at the bottom of the list. |
|
Outdated. This section is now labeled Software Center. Category and Keywords fields no longer exist. Icon file is the file to use for the application icon. This can be a .ico or .exe. It cannot use .dll’s. Browse allows you to navigate to the file. Once selected, you will see the image of the icon appear on screen. When selecting an exe, it extracts the image into a png format to %temp%. After the application is created, this file is removed during cleanup. |
|
If you wish to add machine names to the newly created AD group, check the box and enter them in the text field. If Testers are defined in the settings XML, this will prepopulate with those entries. This is disabled unless AD Group is checked. |
|
Create button starts the process after all selections have been made. Once complete, the form will reset. Reset Form resets all the fields and selections to the form’s original state. Quit closes the form. |
|
This box is read-only and will display messages as progress completes. Certain actions will perform validation checks in which will display Pass or Fail messages. Others will just continue on. Clear Log button will reset this display to its original state. |
This may look complicated. But an Application can be created with just a few button clicks. Here’s an example with only 5…
- Enter package name.
- Select Script.
- In this example we are using the PowerShell Application Deployment Toolkit (which is a great tool) for our package. Install and Uninstall commands are set automatically, imported from the XML.
- Within the package we have an MSI. Browse to this to import the Product Code for Detection.
- I know we could have chosen MSI for the Deployment Type. But in my experiences, most packages (even MSI packages) are called within some sort of wrapper, in this case PSADT. So, I feel that this is the best example.
- Here we chose to only import an icon.
- Create.
- Output is logged as the tool runs.
Additional validation checks are in place to check user input. If any fail, an error message will appear on the screen. Such as.
If a step errs during creation of the App, that error should also be displayed in a message window with the full error details.
Some pre-validation checks are also performed at various steps, and if that feature already exists there will be a prompt to Skip or exit. This allows the packager to continue using the tool even if some steps were already completed. Or cancel out if it was unintentional.
Additional troubleshooting may be done by running the tool in debug mode. This is by calling the ps1 with the switch “Dbug” (.\MECMAddAppTool.ps1 -Dbug). This simply keeps the PS console open during run so that any console output is visible, which may include errors.