PowerShell API
The included PowerShell plugin provides a powerful way to extend the SCCM Manager with custom functionality. For more information on integrating the plugin, please visit the plugin's page.
Example configuration
Script directory
Example: Calling a specific script and displaying a dialog box
Example: A specific user group should only see the scripts in the “MyGroupBasedScripts” directory
Example: Only remote scripts should be displayed
Example: Only remote scripts from a subdirectory should be displayed
Example: All scripts should be displayed
Example: Placeholder variable and integration of a script into the context menu
Script directory
Example: Running a specific script that displays a dialog box
The script to be executed is located in the directory: {Installation path}\SCCM2012WebService\PS1\{Domain}\Custom\Remote\Test.ps1
| Property | Description |
| Assembly | PowerShellPlugin |
| Name | My test script |
| Icon | Dummy.png |
| Argument | {COMPUTERNAME} |
| SelectedComputer | SingleWithPing |
| Function | SHOW_MESSAGE |
| Parameter | -Type=Remote -Script=Test.ps1 -AnyAdditionalParameter=Test |
- Assembly: PowerShellPlugin
- Name: My test script
- Icon: Dummy.png
- Argument: {COMPUTERNAME}
- SelectedComputer: SingleWithPing
- Function: SHOW_MESSAGE
- Parameter: -Type=Remote -Script=Test.ps1 -AnyAdditionalParameter=Test
Example: A specific user group should only be able to see the scripts in the “MyGroupBasedScripts” directory
This directory must therefore be specified as an argument in the corresponding configuration. Since these scripts are located neither in the remote nor in the local directory, the user can choose whether to run the script remotely or locally (by default, a script is always run remotely).
Example: Only remote scripts should be displayed
Example: Only remote scripts from a subdirectory should be displayed
Example: Display all scripts
Example: Placeholder and adding a script to the context menu
The selected script is provided here solely as a computer-based example.
a) Create a new function group and set the context menu flag
b) Create a new action, select the PowerShell plugin, define the function and parameters, where the latter is a script-specific parameter and {COMPUTERNAME} is automatically substituted
c) After restarting SCCM Manager, the new context menu item will appear and be available for use