SCCM Console Extensions – Parameters
OK, so now you know the GUID for the right-click tool… but what about passing parameters?
There are a few standard SUB’s (parameters) that you can use, some are listed in this post: http://www.snowland.se/2008/05/28/sccm-console-extensions/
But if you take the example of GUID 5fb29b42-5d11-4642-a6c9-24881a7d317e that you can find under Software Distribution Packages / Packages / Some package / Package Status / Site Server / Right click on a distribution point
Say that you want to pass the server-name or the path to the package…
First off, open the
Then search for the GUID and you will find something like this.
<NodeDescriptions> <ResultPaneItemDescriptions> <ResultPaneItemDescription NamespaceGuid="5fb29b42-5d11-4642-a6c9-24881a7d317e" DesignerName="Localize:Status scoped result panel definitioN"> <Queries> <QueryDescription NamespaceGuid="54d25192-0e7a-47b2-a6f2-67ff764d41c6" Type="WQL" HelpTopic="e63a41d2-a2c2-4a52-bfbb-67dc0bd7b429"> <SupportedTypes> <string>SMS_PackageStatusDetailSummarizer</string> </SupportedTypes> <Query>SELECT * FROM SMS_PackageStatusDistPointsSummarizer WHERE PackageID='##SUB:PackageID##' AND SiteCode='##SUB:SiteCode##'</Query> <ReturnedClassType>SMS_PackageStatusDistPointsSummarizer</ReturnedClassType> </QueryDescription> </Queries> </ResultPaneItemDescription> </ResultPaneItemDescriptions> </NodeDescriptions>
A few lines below the GUID you find
Will look something like:
SELECT * FROM SMS_PackageStatusDistPointsSummarizer WHERE PackageID='XYZ00123' AND SiteCode='XYZ'
Next step is to start some WMI-browser and connect to root\SMS\site_XYZ and run the query and take a look at the columns.
(I like to use WMI Explorer)
In the query above you will have columns like ServerNALPath, SourceNALPath, SourceVersion this is what you are looking for. 🙂
Use them in your extensions like this:
<Executable> <FilePath>myScript.vbs</FilePath> <Parameters>##SUB:ServerNALPath## ##SUB:SourceNALPath## ##SUB:SourceVersion##</Parameters> </Executable>