$form = [System.Windows.Forms.Form] @{ Text = 'Mi formulario' } $button = [System.Windows.Forms.Button] @{ Text = 'Pulsar' Location = New-Object System.Drawing.Point(10,40) } $TextBox = [System.Windows.Forms.TextBox] @{ Text = "Introduzca proceso para arrancar" Size = New-Object System.Drawing.Size(260,40) } $button.add_Click{ Start-Process $TextBox.Text } $form.Controls.Add($button) $form.Controls.Add($TextBox) $form.ShowDialog()
Ejercicios de PowerShell: crear un GUI en donde se introduzca un nombre de proceso y mediante el pulsado de un botón se arranque dicho proceso (PowerShell)
Except where otherwise noted, Jesusninoc by Jesús N. is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.