How to update an already existing Gridview in Powershell instead of showing a new one?

AlLerner
AlLerner used Ask the Experts™
on
I would like to run a certain scheduled PowerShell script that shows a gridview as a result. Not a problem so far. The problem is, I don't want that every time a new GridView Window to be opened.

Does anyone have an Idea how to update the data in the grid instead of opening a new grid in a new window every time the script runs?

Thanks

Alexander
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The data in Out-GridView is static to the best of my knowledge. Someone has already raised a request with Microsoft to add a -refresh switch to have the data refresh at certain intervals. You would probably want to look at creating your own .NET GUI with a Data Grid and a refresh built in.

Have a look at: http://thepowershellguy.com/blogs/posh/archive/2007/01/21/powershell-gui-scripblock-monitor-script.aspx

Author

Commented:
I've requested that this question be deleted for the following reason:

Noone has an answer
I don't know if this finding out that what you want is not possible constitutes "Noone has an answer". You have an answer and also an alternative. I've presented you with a link to created your own custom out-grid script which will allow you to refresh on an interval or with a refresh button. As it stands, MS have not given the ability with the Out-GridView cmdlet to update data in Out-GridView with dynamic data without running the command again.

Refer Xin Li's (MS PowerShell Team) comment about this: http://blogs.msdn.com/b/powershell/archive/2009/03/12/out-gridview-revisited.aspx

Author

Commented:
Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial