r/sysadmin • Systems Engineer • Aug 18 '16

PowerShell is open source, available for Linux and OS X

https://github.com/PowerShell/PowerShell
1.3k Upvotes

369 comments sorted by

View all comments

Show parent comments

19

u/Vance84 Aug 18 '16

PowerShell lets you connect via...well..PowerShell using different commands (Enter-PSSession for instance) like you would with SSH. Microsoft doesn't want you doing everything through the GUI any more - they want you using PowerShell to manage everything.

6

u/da_chicken Systems Analyst Aug 18 '16

PowerShell lets you connect via...well..

It's a WinRM session, which is an implementation of WS-Management.

8

u/SteveL_Msft Aug 18 '16

That is correct, although the current alpha.9 release includes early code that enables PowerShell remoting over SSH. On Windows, you would need to install OpenSSH as well as the Open Source PowerShell. In in-box Windows PowerShell only understands WinRM.

8

u/GhostDan Architect Aug 18 '16

As a enterprise admin/engineer who uses powershell every day.. hell every hour. You are doing gods work sir. Keep it up!

1

u/Vance84 Aug 18 '16

Thanks, it was on the tip of my tongue, but I couldn't remember - not in a position to do a search at the moment

4

u/minimim Aug 18 '16

They are also promising a complete SSH implementation. Third time is the charm, I guess?

21

u/SteveL_Msft Aug 18 '16

My team is working on that as well http://github.com/powershell/openssh. Note that we aren't doing a "complete SSH implementation" as in writing something from scratch, but implementing a portable layer so that OpenSSH works great on Windows. We're still actively working on this and it'll take time before we can call it production ready, but one of the goals is to get our code accepted back into OpenSSH so we won't maintain a fork in the long run.

4

u/minimim Aug 18 '16

get our code accepted back into OpenSSH

Don't forget you have to go trough the Portability Team. And ask to be included in this page after integrating it in the base system.

I didn't meant a reimplementation, just that it will have both a client and the server.

5

u/SteveL_Msft Aug 18 '16

Correct, client and server.

4

u/minimim Aug 18 '16

Don't forget to ship a tool to strip the BOMs out of scripts, since Unix-like kernels won't recognize a shebang if there's a BOM.

4

u/SteveL_Msft Aug 18 '16

We've been discussing this internally as well as other issues like aliases we created on Windows for common Linux commands. There are open issues on this already, feel free to add your feedback.

1

u/minimim Aug 18 '16

It was said in jest :)

2

u/minimim Aug 18 '16

From what I've been reading, the things people want to do with this, it will stop being useful as soon as OpenSSH for Windows is released.

Also, did you see the new IPC proposal for Linux? Do you think it could be used to simulate COM+ (well, build a new COM+ implementation on top) for PowerShell and .NET? If not, you guys should ask the design to be extended until it can, :) .

1

u/Zaphod_B chown -R us ~/.base Aug 18 '16

I love that but I am still just not quite seeing it, because I have yet to see that paradigm shift happen in the MS stack. I hope you are right though.

2

u/[deleted] Aug 18 '16

I don't know about paradigm shift but they already have near headless servers with "Server Core", they're working on "Server Nano" and containerization. That's not really secret information though...

2

u/Zaphod_B chown -R us ~/.base Aug 18 '16

Oh I believe that is the way they want to go, but it has to be adopted still is what I am getting at.

2

u/[deleted] Aug 18 '16

Ah, yeah, still lots of GUI-admins in the industry.

2

u/GhostDan Architect Aug 18 '16

We use it for some of our SQL servers along with our Hyper-V clusters, where the GUI isn't necessary and remote administration is easy. The first few times setting it up can be a little bit of a challenge "How the f do I do that thing I normally click on" but once you get the hang of it it's great.