NetshUtils.psm1
$Models = @( Get-ChildItem -Path $PSScriptRoot\models\*.ps1 -ErrorAction Ignore -Recurse ) $Private = @( Get-ChildItem -Path $PSScriptRoot\private\*.ps1 -ErrorAction Ignore -Recurse ) $Public = @( Get-ChildItem -Path $PSScriptRoot\public\*.ps1 -ErrorAction Ignore -Recurse ) foreach ($import in $Models + $Public + $Private) { try { . $import.FullName } catch { Write-Error "Failed to import file $($import.FullName): $_" } } $functions = $Public.BaseName Export-ModuleMember -Function $functions |