function Export-ConfigurationData { $result = ( [DialogBuilder]::SaveFile(). SetTitle("Konfiguration speichern"). SetCommonFilter("PSD1"). SetInitialDirectory($settingsManager.Get("DeploymentPath")). SetFileName("merged_config.psd1"). SetOverwritePrompt($true). Show() ) if ($result.Result) { try { $ConfigurationData = $script:ResolvedConfigurationData if($null -eq $ConfigurationData){ throw "Keine aufgelöste ConfigurationData zum Exportieren vorhanden." } Export-Hashtable -Hashtable $ConfigurationData -Path $result.FileName [System.Windows.Forms.MessageBox]::Show("Export war erfolgreich", "Info", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Information) } catch { [System.Windows.Forms.MessageBox]::Show("Export war nicht erfolgreich", "Info", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Error) } } }