Hi James Harland,
Based on my understanding of the issue, you're practicing the following Learning Path exercise.
- Learning Path: https://learn.microsoft.com/en-us/training/paths/powershell/
- Module: Introduction to scripting in PowerShell
- Unit 5 of 11:https://learn.microsoft.com/en-gb/training/modules/script-with-powershell/5-exercise-parameters
I have tried several times to reproduce the issue, and the documented steps works fine for me.
If you are still facing any issue, please let us know in the comments and also provide the error message, along with screenshots for reference. We are glad to help you.
Please click Accept Answer and upvote if the above was useful.Thank you.