I’m hoping to get feedback or advice from others on this mainly cosmetically-driven question. I’ve gotten into the habit of creating my variables like this:
$Script:adUserParams
The lowercase ‘ad’ is something I’ve been doing, and am settled on the fact that I like it. The part I’m wondering about is ‘$Script:’. I’ve read about_Scopes and totally get it. The way this habit started was that it’s my way of muting Visual Studio Code, when it tells me my variable is assigned but never used. Most times, it’s a false positive and running the script will never complain or fail, but nonetheless, I want to be told about my mistakes so I can avoid them, and thus I started assigning all my variables in scripts this way.
Does anyone have a better or just another solution to share with me? And the simple question too, is - is it bad for any reason that I’m doing this (with the notion that I don’t plan on sharing these variables outside of these scripts)?
Thanks and look forward to any feedback.