Solved

Data is not being append in datagridview.. Windows Forms

Posted on 2016-09-06
2
87 Views
Last Modified: 2016-09-08
I am using Powershell Studio to build a gui and the issue i have here is data is not getting appended... attached is the code.. Can someone help me in this ?
sample-query_renametops1.txt
0
Comment
Question by:Aamer Mohammed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 41789918
Replace $buttonShow_Click code block with following.. This basically stores all results in to $OS and then publish it in to the output window..
	$buttonShow_Click={
		$Servers = Get-Content $textbox1.Text
		$OS = $(foreach ($Server in $Servers)
		{
			Get-WmiObject -Class Win32_OperatingSystem -ComputerName $Server
		})
		$table = ConvertTo-DataTable -InputObject $OS -FilterWMIProperties
		Load-DataGridView -DataGridView $datagridview1 -Item $table
		$datagridview1.DataSource = $table
	}

Open in new window

0
 

Author Closing Comment

by:Aamer Mohammed
ID: 41790743
Thanks Subsum.. that works..
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Utilizing an array to gracefully append to a list of EmailAddresses
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question