February 25, 2013

Using Out-Gridview to select objects

If you use the –Passthru parameter with Out-GridView,you will be able to select one or more row, click OK and send the result to the pipeline.

For example, if you wish to restart one or more services, try :

get-service | out-gridview -PassThru | restart-service -Verbose

No comments:

Post a Comment