Originally posted by: drag
can I, say, install and setup MSSQL, say from a laptop in case you get stuck out in the boonies and need to do some emergancy stuff... Or install backups without having to be present to reboot the machine.
Absolutely, all over "Remote Desktop Connection" (a.k.a., Terminal Services). The server must be WinXP Pro or later, the client can be just about anything (including Mac OSX). Why would you have to be present to reboot the machine? "shutdown -r -t 0"
Or dozens of other things.. I dont know.
I don't either.
😛
Can you start and stop services from a ssh client? Say half you dll's are wiped out.
Is the machine still running? Because if they were system dll's, System File Protection would have recovered them automagically (and prevented you from overwriting them to begin with).
But yes, you can start and stop services from the command-line. Try "sc /?" for all the options. This works remotely via a TS connection great too.
For instance in Redhat, Solaris, or Debian every single administration thing that I can do in a GUI I can do in the command line. A configs are simple text based affairs.
First of all, just about every setting in Windows is stored in the Registry. The shell's control panel GUI is mostly just a front-end for setting Registry key values. Windows apps traditionally go to the Registry to fetch settings. The Registry is designed to be accessed programmatically, which means it's absolutely designed for scripting and automation.
The registry has some nice properties because it's not text-based. Each independent key can have individual security restrictions/permissions (unlike configuration files, where the file has a single monolithic set of permissions at the file level). Plus, the Registry stores configuration settings in multiple different data types. Binary, decimal, hexadecimal, strings, array of strings, binary_blob, etc. This makes programmatic access very intuitive. You could say it's "strongly typed".
I mean can you edit the registry from cmd.exe if you have too?
The MSH shell I was referring to earlier actually mounts the registry, so you can walk from RegKey to RegKey, create new keys, display current keys, etc... all like you're dealing with directories and files.
But even if you only have cmd.exe, then you can still use reg.exe ("Console Registry Tool") which is built into XP, for all your registry scripting needs.
Or fix it from recorvery console or copy it to another computer, fix it their and copy it back?
Absolutely. Exporting and importing hives has always been an essential task for Windows sysadmins. Reg.exe supports this from the command-line.
Can I "trail" system logs, or e-mail people via the command line. How difficult would it be to trail a system log and have it e-mail me if it had a certian alert, or a certian person logged in? What if I had a cluster of machines operating that I had to watch over?
I have used a command-line mailer before, but it was not part of Windows itself. It was a freeware utility. SMTP is fully supported by Windows via programming APIs, so scripts can send email like this (and obviously full utility apps can do it too). As for setting up alerts for system logs, I admit to having never done this before from the command-line. But I can almost guarantee that it is exposed via another Programming API (the logging API) and therefore is fully scriptable, and utilities probably already exist to perform common log tasks from the NT command line.
Of course they have a couple Windows machines, and they use VNC for that, but it's a kinda of a pain for them to do anything using it compared to having something right their they can type into.
If they're still using VNC, then I would set them straight. Any admin that knows anything should be using RDC (TS) by now. VNC isn't secure and has lots of other limitations. And as for remote administration, System Update Server (available since NT4 Server) makes remote administration a joke. Your remote admin doesn't even need to know how to use the command-line.
I am not talking just about the shell, but the entire OS. Windows realy isn't designed to be realy administrated from the command line.
Just because you haven't used Windows that way doesn't mean it can't be done. Windows is designed so that if you don't really know what you're doing, you definitely use the GUI. Even some people that do know what they're doing use the GUI. But in Windows Server 2003, for example, almost every aspect of system administration, installation, and configuration can be scripted.
But I just a command line type of guy. Lots of stuff that is easy for me to do on my linux machine is very difficult to accomplish.
I can just about guarantee that 90% of it is JUST as easy to do on Windows from the command line, but the difference is that you THINK it isn't as easy because you don't know how to do it. You've probably only spent time working with the Windows Shell, and never spent much time on the admin side working with various scripting and remoting tools for NT.
And I think a lot of Linux advocates are in the same boat: they get surprised when they find out that Windows can do the same stuff, and they didn't know about it. They make the mistake of
assuming that Windows can't do stuff simply because they don't know how to do it.