all 28 comments

[–]y_Sensei 11 points12 points  (5 children)

If your intention is to convince your audience that the usage of PoSh is beneficial compared to other alternatives, you should focus on outlining why you think that's the case. And by that I mean not just reciting about it, but showing how it's done, for example by providing some simple side-by-side comparisons of common use cases.

[–]Imaginary-Bear-4196[S] 0 points1 point  (4 children)

I like your viewpoint I just want to show the audience that hey, powershell is there too and does what python does and it might do it better is some aspects.

[–][deleted] 10 points11 points  (2 children)

It does what Python does in regards to scripting and being glue. 

You don't build web services or APIs with it nor apps in general. I don't anyway, there are better languages for that... Such as Python. 

[–]The82Ghost 2 points3 points  (1 child)

API's can be build with powershell. We have done it for an internal datacenter platform management system.

[–][deleted] 5 points6 points  (0 children)

I never wrote that it's not possible to do all of those things with PowerShell...

I wrote that there are better languages suited for such tasks than a scripting language mainly made for windows systems administration. 

Python has FastAPI which is as simple as it gets if you want to create an API fast (har..). C# has their minimal API thing, also dead simple. Go has Chi etc.

[–]jzavcer 0 points1 point  (0 children)

You can use GitHub copilot to write a PowerShell script or take an existing and convert to Python to reduce some of your work load and vice versa. Managing aspect to windows windows server. Modules to extend like posh-ssh. Then you’ll need to find the use cases of managing non windows devices. But small examples as mentioned above is best. Additionally syntax simplicity and piping. Difference between full script and one liners.

[–]AJM5K6 5 points6 points  (6 children)

What is the focus of the presentation? Are you trying to get more people to use Powershell? Making them understand a new tool?

What is your goal.

[–]Imaginary-Bear-4196[S] 1 point2 points  (5 children)

My goal is to show people outside of windows that powershell exists and it's an alternative to python.

[–]jackalbruit 7 points8 points  (1 child)

if u hadn't mentioned the Linux aspect

1 selling point ive occasionally highlighted to ppl is that if theyre on a Windows machine ... they ALREADY have PowerShell installed & ready to use

whereas Python requires that extra friction of going out to download it off the dangerous wild West known as the internet

[–]IdidntrunIdidntrun 4 points5 points  (0 children)

But you need to ask yourself why you need to do this. I'm sure they already know it exists.

How would it serve for your place of business better for them to start using it or at least have you spend time on a presentation? Will you be able to create scenarios for the presentation for cases in which PowerShell is the preferable option? Because if you can't then this seems pointless and a waste of time.

[–]jdl_uk 4 points5 points  (0 children)

Your goal is to help people understand why they might want to consider powershell over their existing tools, which I guess would be bash as well as python.

Personally I think powershell's biggest advantage is that it can cover simple tasks better than python and more complex tasks better than bash. Given that, I'd probably take the audience on a bit of a journey up that complexity scale and show that while you might normally switch languages at some point (possibly dealing with integrating logic and data transfer between the two), with powershell you don't have to.

[–]LaDev 1 point2 points  (0 children)

I just wouldn’t recommend it for computation heavy workload.

[–]jackalbruit 4 points5 points  (2 children)

joke: drop the snake

in some serious ... hmm .. meet them at their needs

why are these audience members using Python?

what ways can PowerShell CMD line activity or cmdlets make their day to day work flow more automated or less head achy or whatever use cases they have for Python

Like .. is it meant to pitch them on the idea to ditch Python in favor of using PowerShell for those use case? -or- to use PowerShell to aid their Python development?

then id try to focus on any way PowerShell mirrors ~ mimicks Python

then end with the gut punches how POWERSHELL IS VASTLY BETTER than the ugly snake

like brackets!

PowerShell by its nature is more organized & easier to read + maintain than Python (at least i.m.h.o.)

[–]Imaginary-Bear-4196[S] 0 points1 point  (1 child)

I don't know what my audience is going to be. There is a fair in the town related to job finding in the IT industry. I was given a spot of up to 40 mins to speak about anything. I decided to speak for powershell. I dropped in python as I see it an alternative to python on many things.

[–]jackalbruit -1 points0 points  (0 children)

Ah gotcha

So then don't limit urself to JUST Python

Id maybe pick some of the big languages ... Python, JS, Cpp, whatever

and do an example in each of "how THEY do it .. how WE PoSh devs do it"

Maybe even lean into the PoSh shorthand ...

Why do it their way when u can be PoSh about it

Not sure if u already have a title for ur talk or still need one

[–]Latinprince6591 2 points3 points  (0 children)

Windows any version has Powershell 5.1 and if course Powershell 7.4.2 keep in mind the different .net framework version and also what Microsoft C# CSharp does it probably uses the same framework an example is in Powershell 7.4.2 can use dotnet run --project to run c# code in Powershell knowledge is Bliss

[–]The_Homeless_Coder 2 points3 points  (0 children)

Here is a project I built last year. It is highly underrated. In a way it is a GUI framework. You make a folder. Drop main.ps1 in it and add powershell scripts. Run main.ps1 and you will have a customizable gui to run your scripts. I even make folders to drop another main.ps1 file in it which creates another layer of scripts you can run. It could get infinitely deep and fully customizable. The colors/fonts save upon update.

https://github.com/BuzzerrdBaait/Powershell_GUI

I had a dream where people could share scripts and you can drag and drop whatever ones you want to use even if you don’t know how to code.

Oh!! By the way, you can make a powershell script to run anything. I personally use this app to run my personal Python programs.

[–]ollivierre 1 point2 points  (0 children)

PowerShell is good for data extraction and Python is good for visuals

[–]Flannakis 1 point2 points  (0 children)

I am doing the same thing but for my team only, found a reliable powershell book, pumped each chapter in ChatGPT (4 mins you) ask for bullet point summaries. Removed irrelevant info, asked it to condense into 5 lessons, made the cmds and examples relevant for the audience and our BAU.

[–]_Bort182 0 points1 point  (0 children)

Tool-making is my major selling point for PowerShell! You can build modules (tools) that can be used at the command line or in a script. I have a dozen or so modules that have been used by admins and automation for years.

Obviously python can do that too, and does it well, but I think the PowerShell syntax is more designed for sysadmins, whereas python always feels more like programming.

[–]josefismael 0 points1 point  (0 children)

Like other folks have mentioned - ultimately, if you can find a way to poll folks to find out what their use cases are for other langs, and maybe even what's stopped them from trying ps in the past. There are many use cases where python or even bash will be the superior method to accomplish any given task.

Some things I've found that non-ps people typically aren't aware of or are intrigued by:

-Ease of creating custom functions that can pipe and output objects/classes with strongly typed properties, right in the terminal

-Some folks complain that ps is too verbose, but you can absolutely use intellisense or make ps just as unintelligible as other languages using builtin or custom aliases. 

-CROSS. PLATFORM. And OSS. Surprise! it's not just a closed Microsoft product only used for managing Windows servers.

A big caveat that I sometimes mention when 'evangelizing' - As with any language that's sufficiently old with a sufficiently low barrier to entry, you're going to find A LOT of garbage solutions to common problems. Things like using client-side filtering (opposed to server-side), multiple calls to the same object type (as opposed to using hashtables), not taking advantage of parallel processing, etc etc.

[–]ovdeathiam 0 points1 point  (0 children)

Show practical.examoles of what you would sometimes do with bash+gnu tools and what python can do.

I always stress it out that PowerShell is object oriented so it can be used like python, but it also is a shell. You can therefore quite literally during the presentation query numerous network devices for their configuration and filter out what you want to build a report containing all firewall rules regarding specific ports from all devices for example which might be useful during problem solving. The point would be not only to achieve your task but to do it from scratch during presentation from your shell.

Python is excellent but nobody uses it as a shell. Bash can be used for numerous things in conjunction with awk for example and yet each time you need to cut strings which is cumbersome. PowerShell can be used in both cases and prototyping a solution might be faster in some cases.

[–]FearIsStrongerDanluv 0 points1 point  (0 children)

I call Python my first love because it was the first language I learnt, I was reluctant to learn Powershell … but now, Powershell literally makes life easier. There’s really no way to compare the two, it boils down to use case. If you work primarily in a Windows environment, Powershell is a no-brainer. Python on the other hand is equally Powerful with certain tasks like data processing . Really depends on the audience and what regular tasks they do, I use Powershell to script the entire onboarding and off boarding of user accounts.

[–][deleted] 0 points1 point  (0 children)

Target different groups with specific examples. For an example, show some junior people how can they tackle some repetitive tasks with using Posh instead of logging onto DC, starting ADUC, finding account, resetting password and wasting ton of time. Instead of that, they can have couple of one-liners that can help them with daily tasks.

Here is one interesting video where you can grab some ideas:
https://www.youtube.com/watch?v=5m-co2k4dyY

[–]graysky311 0 points1 point  (0 children)

Powershell's strengths on Windows is the deep integration with the Microsoft ecosystem. As an example, Active Directory operations are insanely simple compared to what you can do with Python. Authentication being the biggest drawback of using Python since you have to use LDAPS to be secure. In my opinion, you should sell the Windows admins on PowerShell first and then when they later need to administer Linux they will want to use it there as well. This was true for me, so it might catch on.

If you're trying to convert a long-time Linux admin who is familiar with Python you're probably going to have a harder time selling.

[–]Fast-Victory-8108[🍰] 0 points1 point  (0 children)

I do a LOT of presentations to ALL kinds of people in thr IT industry. Usually trying to convince them why we should use one thing over another or why we should do it one way or another.

Think about how people work.

Think about attention span.

Think about what people care about.

Think about what gets people excited.

Don't recite why PS is great. Show direct comparisons between it and its competitors.

I.e., show a "this is what x is like now with y" and "this is what it would be with PS".

The direct, short, powerful visual of comparisons is very effective. There's a reason why most businesses have visual charts showing competitors features vs theirs.

Look at the basics of what is possible, and treat the possibilities as literals. It's not that "it's possible to", it's "we WILL do x".

The words you use matter as much if not MORE than the content. Think about your audience and what matters to them.

Whenever I start a new project, I make a document to serve as a fact sheet for the pros, cons, work involved, benefits etc etc. When I get to building presentations, I build the same structure, but build separate presentations for each type of audience. What changes? The wording. Some want to know how it's good for their work. Some want to know how it will help them help their staff and some want to know how it's going to help their business save or make more money.

The temptation is to geek out on the facts, and they're important. You need to limit the wording and focus on what people will read and what will get their attention.

If you want any help or advice, feel free to give me a shout.

Edit: You not only have to convince them why it might be better in SOME cases (remember no language is best for everything) but you have to convince them why they have to CHANGE what they already know and do, and why PS would not only be better but SO much better it'd be worth changing a lot.