MilestonePSTools.psm1
Import-Module "$PSScriptRoot\lib\MilestonePSTools.dll" $public = @( Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -Recurse -ErrorAction Ignore ) $private = @( Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -Recurse -ErrorAction Ignore ) foreach ($import in $public + $private) { try { . $import.FullName } catch { Write-Error "Failed to import function $($import.FullName): $_" } } $cmdlets = (Get-Command -Module MilestonePSTools -CommandType Cmdlet).Name $functions = $public.BaseName Export-ModuleMember -Function $functions -Cmdlet $cmdlets |