This is fantastic. So much potential. Now I tried this and while Get-WinEvent does get the basic information about Events, it doesn't get any of the extended properties of the events. For example I want to find out which user deleted my file - but that info is not part of the lookup. So what other "tools" would I need to "register" so that the PSAI or the language model is able to dig deeper into it and create a code to actually read ALL Properties associated with each Event? Or best approach?
@DougFinke2 күн бұрын
Good question. I have not done that type of analysis manually. I would used the `q` command in PSAI and ask that question. Specifically asking, what other PowerShell functions would be needed to find out which user deleted my file. Then you can do this, for example `New-Agent -Tools Get-Content, Get-WinEvent, Get-Process`. Pass in the functions you want AI to consider using.
@poncardas11 күн бұрын
Love this kind of video. No fluff direct to the point! Thanks 😊
@DougFinke11 күн бұрын
@poncardas no fluff just stuff :-)
@ellocoprogrammador667711 күн бұрын
Great 👍
@johnjlopez14 күн бұрын
How does one change AIs. Is this only compatible with openAI and it's variations?
@DougFinke14 күн бұрын
Currently it works with any OpenAI Model thru the -LLM param I have a branch that works with DeepSeek, Antrhopic and Claude - should be public soon
@extrempty15 күн бұрын
free?
@PollipoUbriacato20 күн бұрын
woah...this is really cool
@DawidJordaan28 күн бұрын
Where do I get the New-Agent cmdlet? Is there a module I need to install before I install PSAI?
@DougFinke28 күн бұрын
Thanks for trying out PSAI `New-Agent` is in PSAI
@cybersamurai9929 күн бұрын
This looks great Doug! I think it would be awesome to help retrieve artefacts from machines and help with troubleshoot in general, that is the first impression I get. Good job!
@DougFinke29 күн бұрын
That is exactly the scenario! Give it try, let me know how it works out or if you have questions.
@garchafpvАй бұрын
Im curious to know if its all local or if i need an api and the data gets sent to 3rd party?
@DougFinkeАй бұрын
The module is designed to be configurable, allowing you to work with either Azure OpenAI or OpenAI directly. Additionally, actively working on adding a provider/model registry (see PR #48) to make it easier to integrate with any provider or model you prefer.
@JarrettCzieschАй бұрын
cool
@MarkFreedmanNYАй бұрын
Very cool. It's been way too long since I used PowerShell. I see it's available for the Mac, so I have no excuse 😁. A lot has changed, I'm sure.
@DougFinkeАй бұрын
Cool, yeah - plus the progress of LLMs an UX like this, doing things are getting easy - and makes doing the impossible probable
@DavidMazimpaka-p9pАй бұрын
How can we get started with the same chatgpt in powershell??
@DougFinkeАй бұрын
Get Started: 🛠Install-Module PSAI 🔗GitHub: github.com/dfinke/PSAI
@JohnConnor-jd9rp2 ай бұрын
Hey Doug, great video quick question I used AI to generate a mermaid diagram script and created it in VS code. How do I save the diagram to a text file or any file from vs code? The diagram looks great but i cant save to any file type
@DougFinke2 ай бұрын
I could not find a way to save it - did not spend time researching. Let me know what you find
@JohnConnor-jd9rp2 ай бұрын
@@DougFinke you can save it as a mark down file
@JohnConnor-jd9rp2 ай бұрын
There's a M down arrow ...upper right
@JohnConnor-jd9rp2 ай бұрын
chatgpt did a great job converting into a mermaid script file - would be a great function for PSAI!!
@DougFinke2 ай бұрын
@@JohnConnor-jd9rp yes, it'd be great for PSAI. The vs code ext uses the Language Server Protocol (LSP). Can't get access to that outside of the IDE. I did have an experiment in a private PSAI doing things with mermaid, but just text->mermaid syntax. This vs code does lots of cool integrated things. Points the way to next steps.
@Justingarcia-r8j3 ай бұрын
Thank you, Doug Finke, for this excellent resource. It's incredibly beneficial for visual learners.
@stevegeall3 ай бұрын
Nice update with the bordered responses 👍
@toddschavey67363 ай бұрын
I can believe that you get that much functionaity from such a simple system prompt. This is such a friggin great idea. Kudos and thanks for sharing. Request: I and a number of folks use LLM providers that are not OpenAI but are "OpenAI compatible". The difference is that one typically provides OPENAI_API_BASE_URL=some-llm-provider/api OPENAI_API_KEY=123456 OPENAI_API_MODEL=gpt-40 Could this be supported? I'll go post an Issue feature request
@brillejesus85423 ай бұрын
very chart 🌠
@igorstepanushko13493 ай бұрын
We can use Set-Clipboard instead 'clip'. it should work smoothly on Windows and macOS
@DougFinke3 ай бұрын
Yes, that works!
@skatterbrainz3 ай бұрын
I learned to spell out cmdlet's on Linux, the hard way. 😊
@ostparktux3 ай бұрын
Cool stuff :-). For make it running under macOS: set-alias -name clip -value bcopy
@ostparktux3 ай бұрын
set-alias -name clip -value pbcopy
@DougFinke3 ай бұрын
@@ostparktux sweet - I'll add that to the readme
@EkomabasiUkanga3 ай бұрын
Enjoying this😊!
@DougFinke3 ай бұрын
Take it for a spin. Let me know how it goes.
@JeffTavares-vl3sl3 ай бұрын
Question for you ... The Export-Excel works great ... but when I attempt to export excel from $queryresult (.type System.Array) ... it will columns RowState,Table, ItemArray, HasErrors to every row in the excel file. Here is excerpt from .ps1 script: # # Needed in order to trust server certificate during this connected session Set-DbatoolsInSecureConnection -SessionOnly # # Set the server, database, and query details $SQLHost = "srv1,1844" $databaseName = "db1" $query = " SELECT TOP 100 q1.School_Year,q1.Attendance_Code FROM table1 q1 " # Execute the query and store the results in $queryResult variable $queryResult = Invoke-DbaQuery -SqlInstance $SQLHost -Database $databaseName -Query $query # # Export Query Data to Excel file $queryResult | Export-Excel $ExportPath1File1 -AutoSize -AutoFilter -FreezeTopRow -Show # switch you can use to debug because it open excel
@KALA5HN1K0V3 ай бұрын
it says chatgpt not found
@DougFinke3 ай бұрын
after clicking the link chatgpt.com/g/g-fgk7Wv5Wo-powershell-menu-wizard ?
@alexanderson66163 ай бұрын
That was reaaly cool! , do you have that up in github?
@kellymoses85663 ай бұрын
PowerShell is the best thing Microsoft has created
@DougFinke3 ай бұрын
Yes! Even better with AI!
@ajarivas723 ай бұрын
Great tutorial. Thank you for sharing.
@DougFinke3 ай бұрын
Glad you liked it! If you haven't already hit the thumbs up and subscribe. Working on more content.
@ajarivas723 ай бұрын
@@DougFinke I just did.
@TechChefMM4 ай бұрын
Amazing content Doug!!! MM
@TechChefMM4 ай бұрын
Fantastic stuff Doug! Keep trailblazing… BTW, recently watch an interview with Jeffrey Snover where he mentioned you’re one to keep an eye in the PowerShell/AI space. MM
@LinoCasu4 ай бұрын
Module not found
@DougFinke4 ай бұрын
AI is moving fast - I obsoleted that module. Now `Install-Module PSAI`
@amirmir32444 ай бұрын
Always checking out your content. You are an amazing PowerShell resource. So thankful for your amazing work. 😊
@DougFinke4 ай бұрын
Thank you @amirmir3244 - glad you find it useful. If you haven't already. Join my Meetup www.meetup.com/nycpowershellmeetup Free to join, you'll get notified when I post new livestream dates. Usually a couple times a month.
@shaunlawrie4 ай бұрын
Nice ❤
@jplock60464 ай бұрын
This seems to be much more efficient than comm object. Will definitely try this out
@matrixview4 ай бұрын
Wow, cool stuff! Journalling, summerizing, reporting, blogging and recommendations... A.I. could soon stand for Assistent Improvement... or Automation Integration
@DougFinke4 ай бұрын
Absolutely! Plus, this is all PSAI + PowerShell in general. No Agents/Assistants needed.
@Horihiraku4 ай бұрын
What is the use of this, any scenario ?? Thanks
@DougFinke4 ай бұрын
I'll leave that for you to research
@matthiasgunther67134 ай бұрын
I have installed the PSAI and the PSAIAgent and also config the $env:OpenAIKey but you command dont show. Is that an old documentation ?
@DougFinke4 ай бұрын
That should work. Check the OpenAI billing - they move to a process where you have to pay credits in advance
@Jimbrig20114 ай бұрын
Preciate the content as always Doug
@mattcargile4 ай бұрын
Dang! That seems so fast to return from chatgpt. Is that just how fast the newer models in the OpenAI 😊subscriptions are?
@DougFinke4 ай бұрын
This is using my PSAI PowerShell module. The REST APIs are in play not the subscription. The default model I set is gpt-4o-mini. Faster than the gpt-4o used in ChatGPT web. You trade off accuracy for larger complex prompts tho .
@matrixview4 ай бұрын
Hi Doug, you're fast! Brundage has Shaun on his Pacific-meetup in 2 days, it's about PwshSpectreConsole.
@Star-system4 ай бұрын
This was my first Powershell video in my journey to automation. Thank's Doug, subscribing to learn some more in future!
@fongfattchee2824 ай бұрын
Thank you! making Big Big impact on many daily tasks for years to come!
@DougFinke4 ай бұрын
Thank you. Glad this is useful
@mattcargile4 ай бұрын
Interesting how the code changed when you added the second code style instruction.
@DougFinke4 ай бұрын
Yes, it highlights the power of the prompt.
@JohnConnor-jd9rp4 ай бұрын
Hi Doug do you have this code up on github?
@DougFinke4 ай бұрын
Thanks for reminding me. gist.github.com/dfinke/e64ccaf86e027a8ea009b2a3ff96ed87
@someguyyoukno4 ай бұрын
Thanks Doug!! 🎉 Great stuff
@DougFinke4 ай бұрын
Glad you liked it. What else would you like to see.
@unitechs12134 ай бұрын
Hi, Can you please tell me how to Sort data in whole worksheet by first column? I'm using ComObject
@railmeat4 ай бұрын
Very interesting, thanks. You start by counting rows and columns, then switch to letters and numbers for the cell ranges. How do you know what cells are being used? How do you enter them in a script?
@DougFinke4 ай бұрын
Yes, the Export-Excel use #'s for rows and columns. That creates data in Row 11 starting Col 5. The Set-ExcelRange. Range tells you that it uses column row notation - example C2, B3 etc I knew the cells being uses because I knew the "shape" of the data. I knew how rows and columns so I could put then in the formula.
@shukrullah19814 ай бұрын
awesome !
@dj1963014 ай бұрын
This is one of my three more favoured PS modules. I don't know what the other two are. Thank you Doug!
@ajarivas724 ай бұрын
Are there more modules besides the Excel module?
@DougFinke4 ай бұрын
@@ajarivas72 there are thousands in the powershell gallery
@sentinel90464 ай бұрын
Is there a way to automate power query in excel with this module? So if the data changes, the user can just click refresh
@DougFinke4 ай бұрын
@@sentinel9046 no, not with this module. This works with only the xlsx directly.
@sentinel90464 ай бұрын
@@DougFinke Thank you
@TechChefMM5 ай бұрын
Intriguing indeed! Awesome work Doug! MM
@DougFinke5 ай бұрын
@@TechChefMM thanks Michael. You should check out my premium l do deeper dives and you get the PSAIAgent and code I demo. Next one at the end of the month - www.meetup.com/nycpowershellmeetup/events/303036413
@georghyfusco5 ай бұрын
Do you need a ChatGPT pro subscription to do that ? Can't figure out how to set the env: OpenAI Key
@DougFinke5 ай бұрын
You need sign up on the OpenAI site for a key, basic subscription. `$env:OpenAIKey="skxxxxxxxxx"`` is how you set it The `New-Agent` function and tools are part of my premium offer: www.meetup.com/nycpowershellmeetup/events/302816941/ I do the livestreams monthly with new content. I email the recording and code, including the PSAIAgent module, after. You don't have to attend when the livestream happens, I email all the people who RSVP.
@georghyfusco5 ай бұрын
@@DougFinke thanks for your quick answer. Have a good day
@ellocoprogrammador66773 ай бұрын
@@DougFinke Hi Doug. I got my $5 worth of OpenIA so the error about quota disappeared but the command { New-Agent | Get-AgentResponse "What is today"} fails with an error about Exception calling "PrintResponse" with "1" argument(s): "A parameter cannot be found that matches parameter name 'AsHashtable'." ... C:\Program Files\WindowsPowerShell\Modules\PSAI\0.2.12\Public\Get-AgentResponse.ps1:37 char:9 ... $agent.PrintResponse($Prompt)
@DougFinke3 ай бұрын
@@ellocoprogrammador6677 mmmm, yeah, you need to run it on PowerShell 7.x - you're running 5.1?
@skatterbrainz5 ай бұрын
Fantastic session! I missed the live meet-up but it's worth carving out time to watch. Thank you!
@DougFinke5 ай бұрын
@@skatterbrainz you're welcome. Glad you found this useful
@ak90005 ай бұрын
Doug - great stuff (again). You mentioned that you can save the output to file (to be emailed etc) - what's the best method in this instance?
@DougFinke5 ай бұрын
Instead of `| glow` you can do something like `| Set-Content .\webSearch.md` and then email that file using your favorite PowerShell way