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 = @{ "Resources" = $(ConvertFrom-TreeView -TreeView $treeView -SkipRootNode) } 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) } } }