PlannerOne.Deployment.psm1
$global:P1SrvExe = "PlannerOneService.exe" $global:IISRootPath = "C:\inetpub\wwwroot" $global:DISMModulePath = "${env:ProgramFiles(x86)}\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\DISM" $global:SourceURL = "https://www.myget.org/F/plannerone/auth/{0}/api/v2" $global:P1SrvPackage = "PlannerOne.[Adapter].Server" $global:P1WebPackage = "PlannerOne.[Adapter].WebApp" $global:P1NavToolPackage = "PlannerOne.NAV.[Version]" $global:TenantPrefix = "PlannerOne" $global:DefaultWebPort = [int] 9010 $global:VerboseLevel = 0 $global:SupportedNavVersions = ("2013R2", "2015", "2016", "2017") $global:ERPS = ("AP", "NAV", "SAGE") $global:ERPToAdapter = @{ "AP" = "AP"; "NAV" = "NAV"; "SAGE" = "REST" } $global:AdapterToERP = @{ "AP" = "AP"; "NAV" = "NAV"; "REST" = "SAGE" } $global:SamplesURL = "http://www.plannerone.com/doc/V6.0/[ERP]/samples" $global:ContextStorePath = "$env:ProgramData\PlannerOne\CurrentContext.json" # Write-Output "Getting functions from $PSScriptRoot" #Get public and private function definition files. $Public = @( Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue ) $Private = @( Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue ) $Dev = @( Get-ChildItem -Path $PSScriptRoot\Dev\*.ps1 -ErrorAction SilentlyContinue ) #Dot source the files Foreach($import in @($Public + $Private + $Dev)) { Try { # Write-Output "Import"$import.fullname . $import.fullname } Catch { Write-Error -Message "Failed to import function $($import.fullname): $_" } } # Here I might... # Read in or create an initial config file and variable # Export Public functions ($Public.BaseName) for WIP modules # Set variables visible to the module and its functions only Export-ModuleMember -Function $Public.Basename Export-ModuleMember -Function $Dev.Basename |