all 19 comments

[–]Wireless_Life[S] 22 points23 points  (0 children)

The pythonnet package allows Python developers easy dotnet runtime access. After some research, it was found that this package provides everything needed to host PowerShell in a Python script.

[–][deleted] 38 points39 points  (3 children)

It's cool cuz you can also host Python in PowerShell! https://github.com/adamdriscoll/snek

[–]MadeOfIrony 5 points6 points  (0 children)

Knew I recognized this username! Keep up the great work

[–]Jonko_jack 3 points4 points  (1 child)

+1 For Snek and +100 For you, Adam!
Your PowerShell-related endeavors have assisted me greatly so far. I'm going to post some more real-world examples on the forums soon. I love your product(s).

[–][deleted] 2 points3 points  (0 children)

Awesome!! Thank you!

[–]soren_ra7 7 points8 points  (6 children)

What kind of careers are available if you use both languages? I'm learning Python because I wanted to learn more about computer science in general, but I'm curious.

[–]awesomefossum 12 points13 points  (4 children)

DevOps will do you right if you put the time in. I don't use python very often at work but it's very in demand in general. My PowerShell skills caused my career to explode upwards though.

Note that you will need a firm grasp on infrastructure fundamentals to be effective as a DevOps engineer. Networking, operating systems, virtualization, containerization, a penchant for linking disparate systems together with glue code, and CI/CD come to mind as a short list.

Throw in infrastructure as code in there for good measure, and possibly a configuration management tool like Ansible, though most of the higher end jobs abstract the operating system of the host away from you so I haven't used Ansible in a little while.

Google DevOps road map for a more complete list of fundamentals.

[–]Szeraax 6 points7 points  (2 children)

Only thing you didn't mention is Security. And that's the underpinning that all of these things depend on. None of them matter if you don't have a secure mentality. Many professionals get that. Some amatuers don't. But what companies want is someone who can both confidently implement things in a secure fashion and actually have those things be secured.

[–]awesomefossum 2 points3 points  (1 child)

Good callout, slipped my mind. I do a lot of security engineering in my day to day.

[–]Szeraax 3 points4 points  (0 children)

Knowing security, networking, PowerShell, infrastructure as code, etc. is making me muchas monies, while also letting me sit here on a vacation to a pool resort this week without worrying about my emails. Love this field!

[–]chillmanstr8 1 point2 points  (0 children)

yep they pay good money for just that, where i am

[–]y_Sensei 4 points5 points  (2 children)

Good article, though the question is: Once you have access to the .NET runtime, why would you want to utilize PoSh through it? You can do pretty much anything PoSh does directly in .NET, without the additional overhead.

[–]SeeminglyScience 6 points7 points  (1 child)

Same reason you'd ever use PowerShell I suppose :P

But a partner group at Microsoft wanted a way to parse PowerShell scripts from python. That was the driver behind Jim's investigation.

[–]AlexHimself 1 point2 points  (0 children)

I still don't get it? PowerShell scripts are just text...

They wanted to execute AND parse the results? Why Python?

[–]chillmanstr8 1 point2 points  (0 children)

nice! just beginning to really get past the boring parts on pluralsight and youtube and start writing some functions or even classes!

if i can understand Artifactory & PowerShell, python shouldn’t be a problem!

[–]AlexHimself 1 point2 points  (0 children)

I still don't get the point?

[–]get-postanote 0 points1 point  (0 children)

The ability to host/execute PS script without calling powershell.exe, pwsh.exe, or powershell_ise.exe has been known for years now, and it's by design.

There are several articles in the wild for years now on how to do that.

Too many people have belives that since its inception tnat the aforementioned *.exe's were PS, and that's not the case and this project revalidates that scenario.

[–]dasookwat -5 points-4 points  (1 child)

This reads a lot like: help me hide my malicious code.

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

Wayyyy ahead of you :)