Solved

Data is not being append in datagridview.. Windows Forms

Posted on 2016-09-06
2
52 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Microsoft Windows Server Update Service (WSUS) is free for everyone, but it lacks of some desirable features like send an e-mail to the administrator with the status of all computers on the WSUS server. This article is based on my PowerShell script …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

930 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now