This article explores a PowerShell function that simplifies user prompts using the $host.ui.PromptForChoice method. By restricting input to predefined options, the function ensures accuracy and ease of use. It returns 0 for No and 1 for Yes, with customizable parameters for the prompt's title, message, and default selection.
Software menu item with open command

Recently I created a PowerShell function to open a open file dialog window, allowing you to browse to that csv file or read in a text file without specifying the path. As this has found it’s way into several of my script’s already, it feels worthy enough to share with

Programming code abstract technology background of software developer and  Computer script

I have been writing a script which generated a report. I had used Out-File to write to a file and this had been working as expected for some time. Today however, I opened up PowerShell and entered the path of the script without changing directory to the script location first.

I’m an IT professional who has worked for distributers and several MSP’s for over 15 years. My main focus is on the Microsoft Cloud but have a deep knowledge in Exchange, Active Directory and core Windows infrastructure. I’m a lover of craft beer and going to live music events. I’m also on a mission to slowly make my home smarter.