CoPilot & ChatGPT in my business

HCHTech

Well-Known Member
Reaction score
4,153
Location
Pittsburgh, PA - USA
The Fabs thread made me want to make this post. I have been living in Powershell lately, writing a shed-load of new scripts for my RMM. While in days of old, I did some simple basic programming, tons of macro-driven spreadsheets in Lotus 123, several databases in Lotus Approach, and even a couple of Access databases, I was never trained as a programmer, and know enough about the craft to know that I just don't have the mind of a programmer. I've come to terms with that fact, and just remind myself that my talents lie elsewhere - haha.

More-recently (10 years ago?) I paid a couple of fiver folks to write some scripts, which I then was able to massage into something workable. Now, however, I have to say that both CoPilot and ChatGPT have been tremendous resources in my current task.

I was amazed to get actual working-first-time examples of scripts to pull some data or make some registry change, or report on a configuration. Just as an example, I now have a script that will fail (which alerts us) if the NIC isn't running at 1GbE. This was as simple as typing the instruction:

"Write a powershell script to check the connection speed of every network connection and exit with 1001 and write "NIC is not at 1GbE!" to the host if speed is not 1 gigabit per second. Exit with a 0 if all connections are 1 gigabit per second and write "All NICS are at 1GbE." to the host.

Both ChatGPT and CoPilot are capable of following the various decision branches and produce working scripts that give the desired result. Since the logic is pretty easy to follow in this example, it's easy for me to look at the code and see what it is doing exactly, and tweak to do something a little differently.

This doesn't make me feel like a programmer, but it sure makes it a whole bunch easier to try out ideas that I would have giving up on in the past just because I know "I could never program that".

So no questions here, just an affirmation of these tools and how pleasantly surprised I have been at their facility for my shop.
 
Last edited:
"Write a powershell script to check the connection speed of every network connection and exit with 1001 and write "NIC is not at 1GbE!" to the host if speed is not 1 gigabit per second. Exit with a 0 if all connections are 1 gigabit per second and write "All NICS are at 1GbE." to the host.

You do realize that even to have typed out that request, you're already "thinking like a programmer" in this specific situation, and doing a damned good job of it.

This is better than certain `specifications` I was routinely asked to work from back in the day.
 
You do realize that even to have typed out that request, you're already "thinking like a programmer"

Well sure - I'll grant that. I think I was referring more to the seemingly endless loop of:
  1. Program didn't work
  2. Search for error message or coding mistake
  3. Fix mistake
  4. Program didn't work, new error
  5. Search for error message or coding mistake
  6. Fix mistake
  7. Program works sometimes but fails in certain instances
  8. Search for failure instances, and how to mitigate
  9. Several trips through 1-3 until you think you found all of the anomalies
  10. Program works! - Release to testing environment
  11. Program doesn't work on several machines, works on others
  12. Search for differences between working and non-working machines
  13. Several trips through 1-3 until you think you've covered all of the problems found in testing
  14. Program works! - Release to wider environment
  15. Collect several reports per day of unique errors
  16. Locate scotch reserves and change your cell phone number
No program is too small to go through this nonsense. Even a 10-line powershell script referred to above to flag underperforming NICS - had these go-rounds and ended up being 22 lines not including comments:
  • NICs with no cable reported as 0Mbps, so re-did the script to only worry about NICs with a status of "Up".
  • Powershell (windows?) insists on reporting speeds in bytes per second, so divide by 1,000,000,000 to make things readable
  • Computers with software VPNs have additional NICs created that for some reason report as 100Gbps. This must have something to do with compression technology, so re-did the script to flag only active connections that are less than 1Gbps, instead of "not equal" to 1Gbps
I'm sure there will be others, but the gist here is that the trip from "I have a great idea" to "I have a working script", isn't something I particularly enjoy. The initial detective work is kind of fun, but the revolving door of additional things I didn't think of at the start that need to be dealt with is....painful.
 
Well sure - I'll grant that. I think I was referring more to the seemingly endless loop of:
  1. Program didn't work
  2. Search for error message or coding mistake
  3. Fix mistake
  4. Program didn't work, new error
  5. Search for error message or coding mistake
  6. Fix mistake
  7. Program works sometimes but fails in certain instances
  8. Search for failure instances, and how to mitigate
  9. Several trips through 1-3 until you think you found all of the anomalies
  10. Program works! - Release to testing environment
  11. Program doesn't work on several machines, works on others
  12. Search for differences between working and non-working machines
  13. Several trips through 1-3 until you think you've covered all of the problems found in testing
  14. Program works! - Release to wider environment
  15. Collect several reports per day of unique errors
  16. Locate scotch reserves and change your cell phone number
No program is too small to go through this nonsense. Even a 10-line powershell script referred to above to flag underperforming NICS - had these go-rounds and ended up being 22 lines not including comments:
  • NICs with no cable reported as 0Mbps, so re-did the script to only worry about NICs with a status of "Up".
  • Powershell (windows?) insists on reporting speeds in bytes per second, so divide by 1,000,000,000 to make things readable
  • Computers with software VPNs have additional NICs created that for some reason report as 100Gbps. This must have something to do with compression technology, so re-did the script to flag only active connections that are less than 1Gbps, instead of "not equal" to 1Gbps
I'm sure there will be others, but the gist here is that the trip from "I have a great idea" to "I have a working script", isn't something I particularly enjoy. The initial detective work is kind of fun, but the revolving door of additional things I didn't think of at the start that need to be dealt with is....painful.
Yep! And if you think CoPilot is good at this, you should see the actual Copilot for Programmers that's bolted into Azure DevOPS / GITHUB... that thing integrates directly with Visual Studio and can spit out a functioning CAD application on a few prompts.
 
Back
Top