The Todd Show - Using CoPilot & ChatGPT to write PowerShell

In this Ask Sympraxis session, we delve into the essence of AI, how to harness its potential, and the tools that stand at our disposal.

What is AI?

The term AI refers to an ever-expansive landscape, where the term is almost meaningless as it covers so many different things. It encompasses a vast expanse of technologies such as:

  • Natural Language Processing (NLP): where computers decipher and respond to human language.
  • Machine Learning (ML): enabling computers to teach themselves.
  • Computer Vision (CV): which grants machines the ability to perceive and manipulate images.

AI mimics human learning, drawing insights from cognitive science, thereby inheriting human-like learning traits, including biases and vulnerabilities. We suggest you think of AI as a form of intelligence rather than a computer. For example, ChatGPT is akin to conversing with a repository of knowledge encapsulating the state of the internet as of September 2021.

Defining AI Terms

Central to AI’s functioning is the Neural Network, mirroring the human brain’s operations, encompassing neurons, data fragments, and connections weighted by parameters. This network guides AI’s decision-making process. AI can “hallucinate,” creating imaginative content not rooted in its training data. The concept of “temperature” tempers this behavior, with higher values fostering creativity, while lower values ensure precision. Alignment denotes the idea of whether AI’s missions and goals are harmonious with yours. Not everyone has the same goals, so how you align the AI is a critical consideration in interaction. The Large Language Model (LLM) is the quintessential AI framework and the interface we engage with.

What is GPT?

GPT is short for “Generative Pre-trained Transformer”. “Generative” implies its capacity to forge original content, such as script or song creation. “Pre-trained” indicates that the model was given instructions on how to learn prior to embarking on learning the actual content. The “Transformer” architecture revolutionizes information processing as it can distinguish that words can have different meanings depending on the context. It uses the other sentences nearby to gain a deeper understanding.

How do we use all of this to write better code?

For PowerShell, but really any code in general, AI will make you faster, minimize errors, further your functionality, and enhance documentation. However, this extends far beyond just code. AI can be used to capitalize improvement across nearly all spheres of creation.

What role is this intelligence going to play for what you’re trying to do?

AI can wear multiple hats - reviewer, creator, collaborator. However, keep in mind that it is very different to physically write code, process it and send it down through your fingertips to the keyboard, than it is to look at code somebody else has written. AI can be helpful throughout the various stages of your project, whether you need it to confirm code or help create an initial idea to defeat the tyranny of the blank page. Depending on your end goals and your work methods, we suggest using GitHub Copilot and/or ChatGPT as your assistant.

In conclusion, the synergy between AI, Copilot, and ChatGPT brings a new era of writing code, promising efficiency, innovation, and empowerment. We hope that by further understanding AI’s diverse facets, you’re better able to align its functions with your objectives. If you have further questions on this topic, our team is happy to assist!

All Resources


Do you have any questions for us? Continue the conversation on Twitter with the hashtag #AskSympraxis and mention @SympraxisC.