How to admin a remote Windows Server with a command line interface?
Asked Answered
R

5

10

When I was a Linux admin I could do anything from the SSH command line. Now, as a Windows admin, I have to deal with the Windows Remote Desktop graphical interface, which I found to be inefective (slow) and hard to automate tasks in it.

a) Can I connect to a Windows Server through SSH or any encrypted connection with command line interface?

b) If yes can I do ANY administrative task?

Examples:

  1. create a new virtual folder in IIS
  2. setup firewall ports
  3. restart services
  4. change user policies
  5. start desktop applications

I know about the existence of Windows PowerShell 2.0 Remoting, but I don't know if it fullfills all conditions above

My conclusion so far: from Windows PowerShell can do MOST but not ALL administrative tasks. And I still don't know if Windows PowerShell 2.0 Remoting uses an encrypted connection.

Roasting answered 8/3, 2009 at 17:12 Comment(0)
P
13

PowerShell is what you're looking for. It is primarily targetted at system administration (although it's fanastic as a programmer's shell, too).

PowerShell v2 remoting is based on Windows Remote Management. See http://msdn.microsoft.com/en-us/library/aa384426(VS.85).aspx. It includes facilities for ecryption and authentication, as you'd expect.

PowerShell includes cmdlets that let you do a lot of everyday tasks. Microsoft server applications (IIS, Exchange, etc.) either have or are building PowerShell cmdlets to administer them. PowerShell's WMI support is excellent, giving you a lot of machine administration power. PowerShell can talk to .NET directly, which lets you go further than built-in facilities when needed. And writing C# for PowerShell to call works out cleanly, too.

You asked for a command line interface, but don't think that you're restricted to the ancient and crufty Windows Console subsystem. PowerShell v2 includes a new GUI interactive shell / script editor, with colorization and debugging. It's sweet.

Potsdam answered 8/3, 2009 at 17:45 Comment(1)
Nice answer. WS-Management/WinRM offers some great flexibility, but does require some investment for setting it up.Schmuck
P
2

You can also try http://sshwindows.sourceforge.net/

I don't have personal experience with it but it looks promising.

Professed answered 8/3, 2009 at 18:30 Comment(0)
L
1

Did you consider Google? (looks like you edited your question. You now no longer ask if the example tasks can be achieved using PowerShell)

Powershell snap-in for IIS 7

Restart-Service

Group policies

etc...

Lampyrid answered 8/3, 2009 at 17:15 Comment(1)
Yes, and I found about Windows PowerShell v2's PowerShell Remoting feature, but I can't find if it is encrypted and I don't know if all tasks I asked can be done this wayRoasting
O
0

Sorry for not answering your question. I was in a similar situation.

I gave up to do all tasks on the windows shell

Instead I do use the shell for some tasks, but I am also using rdesktop (through ssh) and I put icons for the most important gui admin tools on the windows quicklaunch.

I gave up making windows feel like unix because it never will.

Occidentalize answered 8/3, 2009 at 17:49 Comment(0)
K
0

alternatively try to download and install eurysco to use the following features that is based on another logic...

1.create a new virtual folder in IIS (from eurysco commandline to launch vbs or powershell script) 2.setup firewall ports (from eurysco commandline to launch netsh.exe advfirewall) 3.restart services (from eurysco service control) 4.change user policies (from eurysco system registry or commandline to launch powershell script) 5.start desktop applications (from eurysco commandline to launch powershell script)

http://www.eurysco.com/features

Krauss answered 4/8, 2014 at 15:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.