?
Solved

Data is not being append in datagridview.. Windows Forms

Posted on 2016-09-06
2
Medium Priority
?
118 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 2000 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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

650 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