Tag Archives: switch

Friday Fun – A PowerShell Console Menu

When working in PowerShell, and especially when scripting, you might want to give the user a choice of actions. For example, you might develop a configuration script that another admin or technician will run. Perhaps one of the steps is … Continue reading

Posted in Friday Fun, PowerShell v2.0, Scripting | Tagged , , , | 10 Comments

Get PowerShell View Definitions

When you write objects to the pipeline in Windows PowerShell, at the end of the pipeline PowerShell’s formatting system handles displaying the results to the console. It accomplishes this by using a set of rules stored in XML configuration files. … Continue reading

Posted in PowerShell v2.0, Scripting | Tagged , , , , , | Comments Off

Bool vs Switch

I have to say I’m generally impressed with the quality of submissions to this year’s Scripting Games. But there is a recurring concept that some people are using and I think there’s a better way. Some contestants are defining function … Continue reading

Posted in Best Practices, PowerShell v2.0, Scripting | Tagged , , , | 4 Comments