I manage Windows Server 2012 servers. I'm learning PowerShell to manage these servers through command line. My workstation runs Ubuntu and I usually manage Linux servers by connecting via SSH.
Is there a way that I can use Windows PowerShell on Windows Servers from my Linux workstation through command line like SSH access on Linux?
Best Answer
Some options:
http://technet.microsoft.com/en-us/library/hh831611.aspx
I'm not aware of any POSH executables for Linux, so you can't run POSH commands directly from a shell in Linux - you must first get into the Windows machine somehow, like RDP, remote console (DRAC, iLO), SSH, or POSH Web Access.
/Edit- looks like there are some options. http://sharpcodenotes.blogspot.com/2014/01/running-powershell-commands-from-linux.html
You could try and get OpenWSMan to do what you want, but i think you'd have to craft every command like a URL request rather than simply issue the correct Powershell command - as I said, there's no actual Powershell for Linux. You could install the WinRB ruby gem on every Windows machine and then run Ruby code on your Linux box to call Powershell commands.
In neither case does it seem that you will get the interactive Powershell experience, like tab-completion, help, etc. These seem to be for running a script or a single command, and you'll presumably have to capture any errors or other feedback on your own. You're not going to get a first-class solution on Linux.
/Edit again - yes, MSDN says that this will tend to be ugly/clunky. Even the simple/effective solution that he gives looks like no fun.