Exemple #1
0
        public static void InstallModules(DscRepository repository, DscServerNode serverNode)
        {
            if (serverNode == null)
            {
                return;
            }
            List <PsConfiguration> configurations = serverNode.GetConfigurations();

            foreach (PsConfiguration configuration in configurations)
            {
                InstallModules(repository, configuration.Servers, configuration.GetUsedModules(repository));
            }
        }
Exemple #2
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);
        }
Exemple #3
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));
        }