Ages ago I was quite busy scripting in the KornShell. And I had the habit of building quick and dirty graphical interfaces to show the results of the scripts. What I wanted was to look at the IPv6 environment by means of a graphical interface using the Powershell.
So the first thing I did was building some functions in the Powershell (v1.0). Simple graphical functions to be incorporated in my own shell environment, by using the ". " command. That was quite easy because of some excellent blogs.
The functions are written in the Form_Functions_v1.ps1 file.
I got already used to the Netsh command to investigate the IPv6 environment. But I wanted to look at the netsh interfaces from within the Powershell.
The Powershell works with objects, so the netsh output had to be converted to Powershell objects. Happily there is a New-Object command to create Powershell objects from text-output. I created objects ($MyInterface) by using the Netsh interface ipv6 show interfaces command and placed those objects in an collection of objects ($MyInterfaces) , so I could easily work with them in the scripting environment. The objects from the netsh interface are created in the NetshInterface_v1.ps1 file.
Next the graphical interface. I wanted to build some interface to quickly inspect the IPV6-interfaces. The idea was to build a drop-down list to gather the the objects to be investigated and to show the attributes and their values in a very simple window. The contents of the windows had to be derived from the object-properties. The enumeration of the created objects and the display are written in the NetshInterfaces_GU_v1.ps1 file.
Of course all the syntax and so, are quite crude and may not be as sophisticated as could be. But i'm just starting my investigations, so – in time- maybe you will see some improvements. You can find the Powershell Scripts in the NetshInterface_v1.zip file in the download section.