Solved

Data is not being append in datagridview.. Windows Forms

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

The article will show you how you can maintain a simple logfile of all Startup and Shutdown events on Windows servers and desktops with PowerShell. The script can be easily adapted into doing more like gracefully silencing/updating your monitoring s…
In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 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

18 Experts available now in Live!

Get 1:1 Help Now