Don’t use $input in PowerShell Functions!

Just a short post and a gentle reminder to check conventions before pulling my hair out over a simple issue.

This all started when I wanted to test something simple in PowerShell. I had started using C# more often and I think this is what caused my brain just to use $input as I would normally use something like this in C#.

In C# my test functions (or methods) might look something like this:

public string TestFunction(string input){ 
Console.WriteLine(input);
}

--

--

A humble tech enthusiast and dad writing articles about the tasks I perform whilst working. Hopefully, you find something useful… I never do.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
IT. Delinquent

A humble tech enthusiast and dad writing articles about the tasks I perform whilst working. Hopefully, you find something useful… I never do.