SBR.INSTALL.psm1
|
$ModuleRoot = Split-Path -Parent (get-module "SBR.INSTALL" -ListAvailable).Path Write-Verbose "Importing Module Script from: [$($ModuleRoot)]" Get-Item $ModuleRoot | Get-ChildItem -Recurse -Filter '*.ps1' | Where-Object FullName -NotLike '*Tests.ps1' | Where-Object FullName -NotLike '*_config.ps1' | Where-Object FullName -NotLike '*_dependencies.ps1' | Sort-Object Name | ForEach-Object { Write-Verbose "Loading $($_.Name)" . $_.fullname } Write-Verbose "Scripts imported" if (Test-Path $ModuleRoot\_config.ps1) { . $ModuleRoot\_config.ps1 } Export-ModuleMember -Function * -Variable * if (Test-Path $ModuleRoot\_dependencies.ps1) { . $ModuleRoot\_dependencies.ps1 } Write-Host "Use [Install-SBRAgent -RegistrationKey {key}] to install Agent." |