The first part of the PoshBoard cmdlets tutorial is available here on poshboard.com
jeudi 18 juin 2009
mardi 16 juin 2009
Poshboard comes with a PowerShell Snapin with several cmdlets that generate PowerShell custom objects. These objects are then converted to Silverlight controls in Poshboard. The properties / methods used for these cmdlets are equivalent of Silverlight controls properties.
The logic of Silverlight objects is respected: you’ll find the corresponding properties of Silverlight controls in the PowerShell objects (It ease the learning process as you’ll find Silverlight sample on internet that you can convert to Poshboard PowerShell objects).
Note: not every Silverlight controls properties are available in Poshboard cmdlets, because they are not useful in the context of Poshboard (or due to a lack of time..). But the main idea was to keep the object model simple to understand. In the future, if some properties prove to be really needed, they will be added to the solution easely in future updates.
.NET developer that got previous experience on Silverlight development will also be able to rapidly develop PowerShell controls, as the logic is the same (but with the benefice of the Dynamic and model of PowerShell! )
Snapin relationship with PoshBoard and Silverlight
Poshboard use WCF to enable communicate between Silverlight clients (your web page) and the Poshboard server. PowerShell objects are created by the user scripts, and these objects are then converted to Silverlight control and dynamically added to the Silverlight GUI, along with the results of other PowerShell cmdlets (you can re use any kind of script that you already designed, or downloaded from internet)
Sample Architecture of Poshboard Silverlight conversion of Visifire charts
Installing the snapin is really simple, you don’t even need to have Poshboard installed to use it and to design your future Silverlight objects.
Copy the two Dll from the Snapin zip file in a directory of your server or workstataion (Example : c:\ressources)
Launch the following line in a console (with administrator privilege in Vista / Seven / W2K8) :
- For x86 Systems:
- For x64 systems:
You’re ready to script :
- Open a PowerShell console, and type :
- List all cmdlets
Here’s the list of these cmdlets:
We will describe all these cmdlets and the corresponding controls in the next post.