locked
Question about Management pack bundles and PowerShell Script Workflows RRS feed

  • Question

  • I have create a custom MP with several workflows that consist of a single Powershell activity.

    The authoring tool saves out the xml, DLLs, xoml, xomlx files.

    Its my understanding that I need to copy the DLL files to the server in the \service manager directory. (have have done with with single WFs)

    What I am curious about is if I can use the New-SCSMManagementPackBundle cmdlet to package these files so that they can be imported in a single shot.

    I have attempted to do so, but have not been successful.

    Set-Location "D:\Authored ManagementPacks"
    
    $MPBPath = "Custom.ServiceManager.PowerShell\Custom.ServiceManager.PowerShell.mpb"
    
    $MP = "Custom.ServiceManager.PowerShell\Custom.ServiceManager.PowerShell.xml"
    $R1 = "Custom.ServiceManager.PowerShell\SetCRStatusExecuted.dll"
    $R2 = "Custom.ServiceManager.PowerShell\SetMinorCRStatusApproved.dll"
    $R3 = "Custom.ServiceManager.PowerShell\AddMinorChangeApprovers.dll"
    $R4 = "Custom.ServiceManager.PowerShell\ApplyEndDatePastNotificationTemplate.dll"
    
    New-SCSMManagementPackBundle -Name $mpbPath -ManagementPack $mp -Resource $R1, $R2, $R3, $R4
    

    getting this back...

    PS D:\PS1\MP Bundle Scripts> .\Custom.ServiceManager.PowerShell.ps1
    New-SCManagementPackBundle : The following resource files are referenced by management packs in the bundle but hav
    e not been added through the -Resources parameter:
    The following files have been added through the -Resources parameter but are not referenced by any management pack
    s in the bundle:
    (1): SetCRStatusExecuted.dll
    (2): SetMinorCRStatusApproved.dll
    (3): AddMinorChangeApprovers.dll
    (4): ApplyEndDatePastNotificationTemplate.dll
    At D:\PS1\MP Bundle Scripts\Custom.ServiceManager.PowerShell.ps1:23 char:29
    + New-SCSMManagementPackBundle <<<<  -Name $mpbPath -ManagementPack $mp -Resource $R1, $R2, $R3, $R4
        + CategoryInfo          : InvalidArgument: (Microsoft.Enter...ckBundleCommand:NewSCManagementPackBundleComman
       d) [New-SCManagementPackBundle], ArgumentException
        + FullyQualifiedErrorId : ExecutionError,Microsoft.EnterpriseManagement.Core.Cmdlets.NewSCManagementPackBundl
       eCommand


    Joshua Fuente

    Wednesday, December 19, 2012 3:17 PM

Answers

  • Nope. Management pack bundles are designed to distribute console resources (forms, tasks, etc). Workflows are specific for management servers.

    For now, you'll have to continue copying workflow DLLs to the management servers by hand. (I have not heard if Microsoft is working on a way to bundle workflow resources. But, if I could do it, I'd extend the MP schema to include <WorkflowResource> with which the import process would distribute the bundled workflow DLL to all available management servers..if I could.. :) )

    • Marked as answer by NachoScript Wednesday, December 19, 2012 8:52 PM
    Wednesday, December 19, 2012 3:48 PM