<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Be geek my friend : PowerShell</title><link>http://blogs.technet.com/dmatey/archive/tags/PowerShell/default.aspx</link><description>Tags: PowerShell</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Powershell con Interfaz de usuario?</title><link>http://blogs.technet.com/dmatey/archive/2008/03/14/powershell-con-interfaz-de-usuario.aspx</link><pubDate>Fri, 14 Mar 2008 14:46:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2998256</guid><dc:creator>dmatey</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/dmatey/comments/2998256.aspx</comments><wfw:commentRss>http://blogs.technet.com/dmatey/commentrss.aspx?PostID=2998256</wfw:commentRss><wfw:comment>http://blogs.technet.com/dmatey/rsscomments.aspx?PostID=2998256</wfw:comment><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;Cuando nos referimos al interfaz de usuario de powershell podemos estar hablando de dos cosas bien diferentes e igual de interesantes.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;Por un lado nos podemos referir a la posibilidad de editar o usar nuestros scripts desde un interfaz grafico diferente al notepad ;-)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;Para este objetivo Microsoft ha añadido un editor de powershell en la versión beta de PowerShell 2.0.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;&lt;IMG style="WIDTH: 414px; HEIGHT: 442px" height=442 src="http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/topics/winpsh/graphical1.jpg" width=414 mce_src="http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/topics/winpsh/graphical1.jpg"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;Pero en Internet podremos encontrar algunas herramientas que no solo nos permitirán editar scripts si no acceder a su información de salida de una forma grafica, interaccionar con los resultados invocando a otros scripts, sacar informes o llamar a otras acciones, en este campo existe una herramienta gratuita denominada PowerGUI &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;de Quest realmente interesante.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US"&gt;&lt;FONT face=Calibri size=3&gt;&lt;IMG src="http://www.quest.com/images/products/powergui_screenshot.jpg" mce_src="http://www.quest.com/images/products/powergui_screenshot.jpg"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;Podéis ver una screencast sobre este producto en el siguiente enlace:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;A href="http://www.powergui.org/shares/powergui/sbin/docs/PowerGUI_Introduction/PowerGUI_Introduction.html"&gt;&lt;FONT face=Calibri size=3&gt;http://www.powergui.org/shares/powergui/sbin/docs/PowerGUI_Introduction/PowerGUI_Introduction.html&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;Por otra parte si estuviéramos interesados en proveer a nuestros scripts PowerShell de una interfaz grafica para nuestros usuarios tendremos otras alternativas.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;En la beta de PowerShell v2 nos encontramos con la funcionalidad de mostrar los resultados en un grid a través del nuevo cmdlet out-gridview.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;Así por ejemplo el comando:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Get-Service | Out-Gridview&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;Nos mostrara un grid con toda la información permitiendo filtrar y ordenar los resultados.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="mso-ansi-language: EN-US"&gt;&lt;IMG src="http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/topics/winpsh/gridview1.jpg" mce_src="http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/topics/winpsh/gridview1.jpg"&gt;&lt;A href="http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/topics/winpsh/gridview1.jpg"&gt;&lt;SPAN lang=ES-TRAD style="mso-ansi-language: ES-TRAD"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;Si queremos permitir que los usuarios introduzcan o interactúen con el script a través de un interfaz grafico, lo podemos hacer invocando a los objetos contenidos en el namespace System.Windows.Forms.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;El problema es que no es que sea muy fácil ni intuitivo y requerira de un tiempo para adaptarse. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;Al final tendríamos código como el que podeis ver en este articulo:&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt; &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/technet/scriptcenter/resources/pstips/default.mspx"&gt;&lt;FONT face=Calibri size=3&gt;http://www.microsoft.com/technet/scriptcenter/resources/pstips/default.mspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: 'Trebuchet MS','sans-serif'; mso-ansi-language: EN-US"&gt;&lt;FONT size=3&gt;De esta forma le podemos pedir al usuario información, mostrar cajas de texto, botones y cualquier control windows para .Net.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: 'Trebuchet MS','sans-serif'; mso-ansi-language: EN-US"&gt;&lt;IMG src="http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/topics/winpsh/psform.jpg" mce_src=" http://img.microsoft.com/library/media/1033/technet/images/scriptcenter/topics/winpsh/psform.jpg"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: 'Trebuchet MS','sans-serif'; mso-ansi-language: EN-US"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;SPAN lang=ES-TRAD style="COLOR: black; FONT-FAMILY: 'Trebuchet MS','sans-serif'"&gt;Otra opción es usar una herramienta denominada AdminScriptEditor que no es gratis &lt;/SPAN&gt;&lt;SPAN lang=ES-TRAD style="COLOR: black; FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Trebuchet MS'; mso-hansi-font-family: 'Trebuchet MS'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;L&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=ES-TRAD style="COLOR: black; FONT-FAMILY: 'Trebuchet MS','sans-serif'"&gt; pero que tiene demo &lt;/SPAN&gt;&lt;SPAN lang=ES-TRAD style="COLOR: black; FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Trebuchet MS'; mso-hansi-font-family: 'Trebuchet MS'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;&lt;SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=ES-TRAD style="COLOR: black; FONT-FAMILY: 'Trebuchet MS','sans-serif'"&gt; (&lt;A href="http://www.adminscripteditor.com/editor/download.asp"&gt;http://www.adminscripteditor.com/editor/download.asp&lt;/A&gt; )&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="COLOR: black; FONT-FAMILY: 'Trebuchet MS','sans-serif'; mso-ansi-language: EN-US"&gt;&lt;FONT size=3&gt;&lt;IMG src="http://www.adminscripteditor.com/editor/sfd/sfd.jpg" mce_src="http://www.adminscripteditor.com/editor/sfd/sfd.jpg"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;FONT face=Calibri size=3&gt;Podéis ver una screencast muy interesante del producto en el siguiente enlace:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN lang=ES-TRAD&gt;&lt;A href="http://www.adminscripteditor.com/editor/sfd/quick1/ASE31_Posh_SFD_Quick1.html"&gt;&lt;FONT face=Calibri size=3&gt;http://www.adminscripteditor.com/editor/sfd/quick1/ASE31_Posh_SFD_Quick1.html&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2998256" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/dmatey/archive/tags/PowerShell/default.aspx">PowerShell</category></item></channel></rss>