Beispiel #1
0
        // Run DSC configuration on server node
        private void miRunConfiguration_Click(object sender, EventArgs e)
        {
            DscServerNode serverNode = (treeLibrary.SelectedNode.Tag as DscServerNode);

            if (serverNode == null)
            {
                return;
            }

            string filename = FileSystem.GetTempFile();

            File.WriteAllLines(filename, PsCodeBuilder.BuildScript(serverNode.GetConfigurations(), _repository));
            PsRunner.Start(filename);
        }
Beispiel #2
0
        // Export DSC configuration for server node
        private void miBuildConfiguration_Click(object sender, EventArgs e)
        {
            DscServerNode serverNode = (treeLibrary.SelectedNode.Tag as DscServerNode);

            if (serverNode == null)
            {
                return;
            }

            if ((dialogSaveFile.ShowDialog() != DialogResult.OK) || string.IsNullOrWhiteSpace(dialogSaveFile.FileName))
            {
                return;
            }

            List <PsConfiguration> configurations = serverNode.GetConfigurations();

            File.WriteAllLines(dialogSaveFile.FileName, PsCodeBuilder.BuildScript(configurations, _repository));
        }