
In my previous post I showed
how to create a quick PowerShell GUI to append some colored text in a RichTextBox control using
Sapien PowerShell Studio 2012.
Today I will go a bit further and show you how to create a tool to query some information from a remote computer. I will first send the Output to Out-GridView cmdlet and then show you how to send it to a DataGridView control inside the GUI.
The tool will query
Services,
Processes and
Shares from a Remote Computer.
You will need to specify the
ComputerName and the
Credential required to perform those actions. The goal is to show how to create something very simple so I did not write any Error Handling or any conditional code in this version.
One cool thing to mention when using PowerShell Studio 2012 is, if you add some controls like a DataGridView, a Listview or a ListBox, PowerShell Studio 2012 will add some functions to help you Load/Add/Refresh those controls. I will show you below in the part "
Replacing the Out-Gridview by a DataGridView Control"