PowerShell API
The included PowerShell plugin provides a powerful way to extend the SCCM Manager with arbitrary functions. More information about the integration of the plugin can be found on the corresponding plugin page.
Example configuration
Script directory
Example: Call of a specific script with display of a dialog
Example: A certain user group should only see the scripts from 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: Substitution variable and integration of a script into the context menu
Script directory
Example: Call of a specific script with display of a dialog
The script to run is located in the directory: {installation path}\SCCM2012WebService\PS1\{domain}\Custom\Remote\Test.ps1
Eigenschaft | 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 certain user group should only see the scripts from the "MyGroupBasedScripts" directory
This directory must therefore be specified as an argument in the corresponding configuration. Since these scripts are neither in the remote nor in the local directory, the user may choose whether to execute the script remotely or locally (by default, a script is always executed remotely).
Example: Only remote scripts should be displayed
Example: Only remote scripts from a subdirectory should be displayed
Example: All scripts should be displayed
Example: Substitution variable and integration of a script into the context menu
The script chosen here serves only as a computer-related showcase.
a) Create new function group and set context menu flag
b) Create new action, select Powershell plugin, define function and parameter, where the latter is a script inherent parameter and {COMPUTERNAME} is automatically replaced
c) After restarting the SCCM Manager, the new context menu entry is displayed and can be used accordingly