How to Install the PowerShell AI module from GitHub.



How to Install the PowerShell AI module from GitHub.

How to Install the PowerShell AI module from GitHub.

This little video shows you how to install the GitHub PowerShell Copilot Module. Although not officially trusted by Microsoft yet, the source and power of it, comes from this company. It is clear and public available for everyone who owns GitHub and OpenAI, and that are the sources. A couple of months ago, MS unveiled products and examples like Microsoft 365 Copilot for the Office Apps. Automating tasks, creating content and output, but it has not been released yet and the price of USD 30 per user per month has raised questions. Hmm… If you can save hours of work, it certainly might we worth it. MS is also extending the OpenAI queries to other product like Bing and Edge for example. They never mentioned PowerShell though, while this is one of the major tools for scripting and automating tasks at the moment. You may be waiting for this till 2024 or 2025 before it will be even announced. No need to wait though, an independent, ChatGPT based Copilot for PowerShell is already public available on GitHub and it is working great! Just tell the tool what you want and it will give you multiple (or just the best) PS lines that get the job done. It is getting the examples form public GitHub resources and it also capable of providing answers for common AI-related error messages and generating DALL-E images. Examples of these features I will show you in future videos. Just install the Module like in this video with the command “Install-Module PowerShellAI” and add the -AllowClobber parameter if you used your paid OpenAI secret before on that device. After that, PowerShell is available for you with the Copilot command followed by a typed command prompt between quotes. If you have not used your OpenAI API key on the system before, you will have to activate it with the command “Set-OpenAIKey [yourkey]” to link it with the PowerShellAI module. Without your (paid) key, none of the module’s tools will work. Although OpenAI has made ChatGPT free to use with data from 2 years ago on their website, accessing it programmatically through this PowerShell module comes with a paid account only. That is also the reason why I do not show my key in this video. If you need additional help with creating and configuring your API key, be sure to check out an online article from Brien Posey first that contains all the steps clearly explained. Just Google for his name and “How To Build ChatGPT-Enabled PowerShell Scripts.” To get started with PowerShell Copilot, just type the word Copilot in PowerShell, followed by the query enclosed in quotation marks. The module will create one or more PowerShell example lines that you can choose from to run. Please note that you might run into issues or errors if the Set-ExecutionPolicy command is set to Restricted or in automation scripts does not contain the Bypass parameter. the Copilot module is designed to with a safety mechanism to prevent it from running code on your system without your permission. Testing this kind of new things should always be done on developers environments and I cannot be held responsible for the results of your output. This module is rather new, but already you can find some good examples on the internet. If you are into new tools and experiments with computers and their tools, you should really check this out. Questions? Just leave me a comment below here.
——–
这个小视频向您展示了如何安装 GitHub PowerShell Copilot 模块。 虽然还没有得到微软的正式信任,但它的源头和力量,就来自于这家公司。 对于拥有 GitHub 和 OpenAI 的每个人来说,它都是清晰且公开的,这就是来源。 几个月前,MS 推出了适用于 Office 应用程序的 Microsoft 365 Copilot 等产品和示例。 自动化任务、创建内容和输出,但尚未发布,每个用户每月 30 美元的价格引发了质疑。 嗯…如果您可以节省工作时间,那我们当然值得。 MS 还将 OpenAI 查询扩展到其他产品,例如 Bing 和 Edge。 但他们从未提及 PowerShell,尽管这是目前用于脚本编写和自动化任务的主要工具之一。 您可能要等到 2024 年或 2025 年才会宣布。 不过,无需等待,一个独立的、基于 ChatGPT 的 PowerShell Copilot 已经在 GitHub 上公开发布,并且运行良好! 只需告诉工具您想要什么,它就会为您提供多条(或最好的)PS 行来完成工作。 它从公共 GitHub 资源中获取示例,还能够为常见的 AI 相关错误消息提供答案并生成 DALL-E 图像。 我将在以后的视频中向您展示这些功能的示例。 只需使用命令“Install-Module PowerShellAI”安装此视频中的模块,并添加 -AllowClobber 参数(如果您之前在该设备上使用过付费 OpenAI 密钥)。 之后,您可以使用 Copilot 命令并在引号之间键入命令提示符来使用 PowerShell。 如果您之前没有在系统上使用过 OpenAI API 密钥,则必须使用命令“Set-OpenAIKey [yourkey]”激活它,以将其与 PowerShellAI 模块链接。 如果没有您的(付费)密钥,该模块的任何工具都将无法工作。 尽管 OpenAI 已在其网站上免费使用 ChatGPT 2 年前的数据,但通过此 PowerShell 模块以编程方式访问它仅需要付费帐户。 这也是我在这个视频中没有展示我的钥匙的原因。 如果您在创建和配置 API 密钥方面需要其他帮助,请务必先查看 Brien Posey 的在线文章,其中包含清楚解释的所有步骤。 只需 Google 一下他的名字和“如何构建支持 ChatGPT 的 PowerShell 脚本”。 要开始使用 PowerShell Copilot,只需在 PowerShell 中键入单词 Copilot,然后输入用引号引起来的查询。 该模块将创建一个或多个 PowerShell 示例行,您可以选择运行它们。 请注意,如果 Set-ExecutionPolicy 命令设置为“受限”或在自动化脚本中不包含 Bypass 参数,您可能会遇到问题或错误。 Copilot 模块设计有一个安全机制,以防止它在未经您许可的情况下在您的系统上运行代码。 测试这种新事物应该始终在开发人员环境中完成,我不能对您的输出结果负责。 这个模块相当新,但您已经可以在互联网上找到一些很好的示例。 如果您喜欢新工具以及计算机及其工具的实验,您应该真正检查一下。 问题? 请在下面给我留言。
——–