-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Currently, any new functions added to the module have to be manually imported into the required processors. If there are a number of imports already existing, then it can be tedious to update all of them. Instead, we should be dynamically importing all methods that are in the Module Functions and Custom Functions folders for the module:
$moduleId = "{9F3EEA96-CEC8-4C7D-B26B-6D15AB654AF1}"
$scriptTemplateId = "{DD22F1B3-BD87-4DB2-9E7D-F7A496888D43}"
$item = Get-Item -Path "master:" -ID $moduleId
$query = "$($item.ItemPath)/#Functions#//*[@@TemplateId='$($scriptTemplateId)']"
Get-Item -Path "master:" -Query $query | ForEach-Object { Import-Function -Name $_.Name }
michaellwest
Metadata
Metadata
Assignees
Labels
No labels