private void SysInfo_Load(object sender, EventArgs e) { PowerShell ps = new PowerShell(); Dictionary<string, string> obj = ps.GetSystemInfo(); LBL_OSVersion.Text = obj["OS_Version"]; LBL_PSVersion.Text = obj["PS_Version"]; }
private void Main_Load(object sender, EventArgs e) { //Service service = new Service(); ////service.GetServices(); ////Service.ServiceObject so = service.GetServiceInfo("AdobeARMservice"); //Update update = new SPUpdater.Update(); ////update.CheckForUpdates("SharePoint Server 2013", "CU"); log.Info(System.Environment.NewLine + "########################################" + System.Environment.NewLine + "# SharePoint 2013 Updater #" + System.Environment.NewLine + "# By: Thomas Sloan #" + System.Environment.NewLine + "########################################" + System.Environment.NewLine); db = new DatabaseHelper(); PowerShell ps = new PowerShell(); ps.UpdateExecutionPolicy(Microsoft.PowerShell.ExecutionPolicy.Unrestricted); ps.GetPowershellVersion(); // Start the BackgroundWorker. panel1.Visible = true; backgroundWorker1.RunWorkerAsync(); }