- Updated Export-ConfigurationData to use resolved configuration data directly and added error handling for missing data. - Enhanced Load-Templates to streamline category loading and improve error handling for missing template directories. - Removed Merge-ConfigurationData function as it is no longer needed. - Refactored Merge-Templates to improve merging logic and handle default files more effectively. - Introduced Get-TemplatePreviewData function to handle template preview data retrieval and merging. - Added Import-OrderedPowerShellDataFile function to support ordered hashtable imports. - Updated Update-ParametersPanel to handle parameter and variable tab updates more efficiently. - Improved Update-TreeView to handle cases where resources are not found. - Added new parameters to Environment.Default.psd1 for Active Directory configuration. - Created new template BGW-LAN.psd1 for domain configuration.
21 lines
693 B
PowerShell
21 lines
693 B
PowerShell
$formsType = 'System.Windows.Forms.Form' -as [type]
|
|
if ($null -eq $formsType) {
|
|
Add-Type -AssemblyName System.Windows.Forms
|
|
}
|
|
|
|
$drawingType = 'System.Drawing.Color' -as [type]
|
|
if ($null -eq $drawingType) {
|
|
Add-Type -AssemblyName System.Drawing
|
|
}
|
|
|
|
if ([System.Threading.Thread]::CurrentThread.GetApartmentState() -ne [System.Threading.ApartmentState]::STA) {
|
|
$powershell = (Get-Command powershell.exe -ErrorAction SilentlyContinue).Source
|
|
if ($powershell) {
|
|
& $powershell -NoProfile -ExecutionPolicy Bypass -STA -File $PSCommandPath @args
|
|
exit $LASTEXITCODE
|
|
}
|
|
}
|
|
|
|
$coreScript = Join-Path -Path $PSScriptRoot -ChildPath 'Compiler.Core.ps1'
|
|
& $coreScript @args
|