News for hackers. Stuff that matters.
Re:PowerShell Remoting by nunez on Tuesday August 21, 2018 @10:12PM (#17815714)
Remoting is SSH, but with much much MUCH more bulk (because it transfers full objects over the wire and uses SOAP as its wire protocol; see here: https://docs.microsoft.com/en-us/powershell/module/microsoft...

Now that Windows 10 and above support native SSH with a somewhat-real pseudo terminal, we can probably just use SSH instead in the next year or two without having to pay Bitvise a ton of cash

Re:PowerShell Remoting by cm2187 on Wednesday August 22, 2018 @01:12AM (#17816471)
The bulk because of soap is sort of irrelevant unless you are in a really slow connection where the size of every packet counts.

I have more serious griefs against powershell remoting.

For instance it is set up as a delayed start service which means you often have to wait more than a minute after a VM rebooted before you can log into it.

Windows Update is accessible by remoting through a COM API that doesn’t allow remote connections, so you can’t do the equivalent of a simple apt-get update remotely. There are horrible hacks around it, like setting up a scheduled task to trigger or collect the update and run that task from remoting and collecting the result some random way like reading a text file.

It really feels half baked, barely usable, and an ugly reminder that CLI has been added to windows as an after thought.

[edit] also I believe it is unencrypted by default. You have to enable https, which isn't straightforward. And you can't change the default ports.

Re:PowerShell Remoting by zaat on Wednesday August 22, 2018 @03:07AM (#17816917)
> Windows Update is accessible by remoting through a COM API that doesn’t allow remote connections, so you can’t do the equivalent of a simple apt-get update remotely.

This isn't even remotely related to PowerShell (no pun intended), it's a security based decision of the windows update API. You can say that it is annoying, stupid and cause of hacks that are much less secure than opening remote operations to the API, and I will agree with you. But it isn't PowerShell business.

As as side note If you are using SCCM you can use WMI for windows update.

PowerShell is far from being half baked, it is a first class citizen in Windows, all the OS GUI tools today executes operations through PowerShell. Many let you see the commands so you can bypass the gui next time and run the commands yourself. As a matter of fact, many things these days can only be done by the shell, while the GUI only expose limited set of the available API.

Re:PowerShell Remoting by cm2187 on Wednesday August 22, 2018 @03:11AM (#17816931)
I am not sure what you are trying the achieve by setting the cursor between the update API and powershell. Both are managed by the same group within the same company. The fact is Microsoft delivered an ssh-like scripting capability that cannot do simple things like updating the OS. You can call powershell a wonder, I beg to differ.
Re:PowerShell Remoting by zaat on Wednesday August 22, 2018 @03:51AM (#17817083)
> Both are managed by the same group

I highly doubt that this is this the case.

>The fact is Microsoft delivered an ssh-like scripting capability that cannot do simple things like updating the OS

If you measure PowerShell by its ability to perform OS updates then you are correct, it is a failure. But the fact is that this annoyance isn't caused by the shell being half baked but rather it is an API decision of a different, unrelated product. The shell provides great usability in all other aspects - that is, the whole OS and other Microsoft and 3rd party software.

Re:PowerShell Remoting by radicalbyte on Wednesday August 22, 2018 @06:00AM (#17817569)
Most of the issues I had with powershell remoting were related to the security model. It's totally integrated into AD. Which is fine if you're in the domain, but a nightmare to manage when you're not. Or if you want to do anything cross-domain (because, you know, you might now want to combine a production and test domain, or have any kind of explicit trust relationship).
Re:PowerShell Remoting by AnIdiotOnTheNet on Wednesday August 22, 2018 @08:01AM (#17818048)
As a fan and frequent user of PowerShell, I'm afraid I have to agree that PS remoting is pretty clunky. I often end up using psexec with cmd instead.
Re:PowerShell Remoting by sametmax on Wednesday August 22, 2018 @08:32AM (#17818197)
Not irrelevant: reactivity when typing in a remote shell affects very important features such as completion or resizing.
Re:PowerShell Remoting by userbinator on Tuesday August 21, 2018 @10:29PM (#17815800)
Note that Windows has had a similar capability to SSH for many years, but it's unfortunately not so well-known: https://docs.microsoft.com/en-us/sysinternals/downloads/psex... ("ps" prefix is unrelated to PowerShell, in fact I think this utility predates it.)

It uses DCE-RPC which is not trivial, but I believe it is certainly more compact than SOAP and such. The main advantage is the server component is built-in.

Re:PowerShell Remoting by Something1234 on Tuesday August 21, 2018 @11:11PM (#17815985)
For the curious, https://en.wikipedia.org/wiki/Distributed_Computing_Environm...

It sounds super complex to setup.

Re:PowerShell Remoting by amaccuish on Wednesday August 22, 2018 @07:41AM (#17817952)
Windows only takes the wire protocol from DCE, and added a few things here and there. It's used extensively in Windows, e.g. the DNS MMC snapin. For NT Domains it was THE protocol, until Microsoft moved to AD with more standards-based protocols, but even AD still heavily relies on RPC, i.e. for replication. The annoying thing about MSRPC is that it uses a portmapper process, like sun rpc for NFS3, so it's a pain to use with firewalls, as ports are randomly assigned. But it's widely simpler than a DCE environment, it's been made to fit internet protocols.
Re:PowerShell Remoting by xenophonf on Tuesday August 21, 2018 @11:38PM (#17816105)
psexec is trivial to install and use: just download and run. At worst you might need to enable the RPC ports in the Windows firewall, which is also easy (even at scale thanks to GPO).
Re:PowerShell Remoting by cm2187 on Wednesday August 22, 2018 @02:58AM (#17816878)
But is there anything to install or setup on a windows server other than opening a port? Also does it require the server to be domain joined?
Re:PowerShell Remoting by pjc50 on Wednesday August 22, 2018 @03:42AM (#17817045)
No, all it requires is that "file and print sharing" is turned on and accessible. Windows has a default, hidden share "Admin$" which is used for this (just as "c$" exists as a share even if you don't explicitly share anything)
Re:PowerShell Remoting by ams6110 on Tuesday August 21, 2018 @11:06PM (#17815959)
I was doing remote logins to Windows servers over SSH using cygwin like 10 years ago.
Re:PowerShell Remoting by amaccuish on Wednesday August 22, 2018 @07:43AM (#17817965)
Yes, and it's was an awful hack and provided an incredibly poor experience. Luckily things are changing with https://blogs.msdn.microsoft.com/commandline/2018/08/02/wind...
Re:PowerShell Remoting by H1Supreme on Tuesday August 21, 2018 @10:40PM (#17815841)
I use SSH with the Windows 10 Ubuntu subsystem every day at work. It works great. Aside from the tmux windows frequently needing detached because of graphical glitches (they get "stuck" for lack of a better phrase), I don't have any complaints.
Re:PowerShell Remoting by davvolun on Wednesday August 22, 2018 @04:21PM (#17821816)
Considering the relative age of WSL integration in comparison to Windows and Linux themselves, it's progressing very nicely. I feel almost as comfortable on Windows now as I did on OS X 10 years ago -- but I don't need to pay the Mac Tax.