switchport Security

70-648, NAP, DHCP, IPNG, IPv4, IPV6, DNS, Global Names, WDS, Server Core, WAS, Server Manager, OCSP, WBAdmin, Group Policy, BitLocker, Active Directory, switch module, route module, firewall module, auto secure, network, router ospf, authentication, drupal.org
Showing posts with label ServerManagerCMD. Show all posts
Showing posts with label ServerManagerCMD. Show all posts

Tuesday, December 25, 2007

Server Manager CMD

It's Christmas in my timezone right now so I'll greet everyone a very, merry Christmas first!

Hmm, need to script what you see in Server Manager? Well, don't fear. We have just the tool for that and it's called ServerManagerCMD.

Microsoft distinguishes Roles from Features in Windows Server 2008. This is obvious in the GUI and in the CLI as well.

What's in here?
-What's ServermanagerCMD?
-Using ServerManagerCMD


What's ServerManagerCMD?
Servermanagercmd.exe is a CLI tool designed to perform the following tasks listed below:
  • Show roles and features installed on the server
  • Show role services and features that would be installed if you made it perform results modeling
  • Add/remove roles and features, settings are default

What it can't do are the following:
  • Change settings
  • Remoting (but you can use Winrs or was that Winrm?)
  • Do stuff on ServerCore (but I'm including this though I'm still concentrated on ServerCOre)
  • Manage non-base server roles and features, notably ISA, Exchange, or SQL server

Using ServerManagerCMD

It's quite easy to use servermanagercmd. But first change your CLI properties.

I've changed mine to the following:
  • width: 150
  • height: 3000
Also, create an alias for servermanagercmd.

Why? It's soo long to type.

[Side_Note]

Creating an Alias

Create a file named smc.bat
Type in the following as its contents:
%SystemRoot%\system32\servermanagercmd.exe %1
Solves your problem of typing a very long CLI command and works seemingly anywhere but I'm too lazy to think about how to resolve issues like multiple entries for servermanagercmd. ^__^

Hint! Hint!

s1 -1 input

s2 -2 inputs

s3 -3 inputs

wahahahaha!
[/Side_Note]

Querying installed Roles and Features:
  • servermanagercmd -query Output.xml
Take note of what Roles and Features to install from an install file:
  • servermanagercmd -inputpath FILE.xml

Note:
Using this command won't work because on internal differences in the XML file
  • servermanagercmd - inputpath Output.xml
What works?

Download this:
Command Line Transformation Utility (msxsl.exe)
Brief Description

The msxsl.exe command line utility enables you to perform command line Extensible Stylesheet Language (XSL) transformations using the Microsoft® XSL processor.

These too:
http://rapidshare.com/files/78807142/view.xsl
http://rapidshare.com/files/78807141/remove.xsl
http://rapidshare.com/files/78807140/install.xsl

All you need to do is to convert stuff.

How is that?
  • Query Servermanagercmd and save it as a reference file
  • Use the xsl file to convert individual xml files
Example:



PATH:\servermanagercmd -query Base.xml

For Installing Roles
PATH:\msxsl Base.xml install.xsl -o install.xml

For Removing Roles
PATH:\msxsl Base.xml remove.xsl -o remove.xml
For Viewing Roles and Features installed or not present
PATH:\msxsl Base.xml view.xsl -o View.html

Using ResultPath for taking note of what happened during installation and removal
PATH:\servermanagercmd -installPath xmlName -resultPath rpName.xml [-restart | -whatIf] [-logPath ]

Actually, you can also use -install and -remove. Crazy, huh?
There! Now you can make most out of ServermanagerCMD!

Note: Updating the Install, Remove, and View xml files created via msxsl seems fine with me but what do you think? I'm still experimenting.


Note: http://technet2.microsoft.com/windowsserver2008/en/library/e7edce1d-442c-4ec3-b324-c748e4f937551033.mspx?mfr=true



Hope you fellas enjoyed!




-Jaeson

Monday, December 24, 2007

Server Management in Windows.Server.2008 ServerCore

I study for certification exams because it's part of my job and I've always come across interesting facts through the course of my studies and eventually forget them. Now, I have a place to go back to and review them all.

What's to expect in this blog?
-What is Server Core
-Server Management and Maintenance (for the GUI)
-ServerCore Management - What I did

-Jaeson


What is ServerCore?

ServerCore (maybe somewhat MinWin in essence) is a minimalistic version of Windows Server 2008 - less the UI, less the annoying and absurd UI at times, and less "that's so easy to do 'coz I saw you do it" thing.

Wouldn't you agree this would be fun?

I'm fancying ServerCore because it's as close as I can get to configuring a router - I'm from the Cisco world and got ported to the Windows galaxy. I'm enjoying so far.

I went to one of Microsoft's exhibits and played around with this new Toshiba laptop that was part of the event - free use of Windows Vista. Instead of clicking with the mouse all day I remembered Vista's new feature - Windows Firewall with Advanced Security, or was that Protection? I'm a frequent listener of TechNet Webcasts.

I spent around 30 minutes and finished playing around with Consec. And was I happy! ^___^


Server Management and Maintenance
(for the GUI)

If we were to manage a gui-type server, we automatically perform tasks on the server that includes optimizing the server, prepping it up, and making it custom-built for our very own production network. Tasks include:

Installing Server Core
Changing the admin password
Configuring networking settings
Setting appropriate Regional settings
Changing video resolution
Adding or removing secure screensavers
Installing programs or adding services
Tinkering with the firewall

...and a lot of other things to do

The above are very common tasks. So, how do we exactly accomplish this in ServerCore?


ServerCore Management - What I did


[Installing ServerCore]
ServerCore installation is pretty straight forward. But if you don't have extra machines, Microsft's Virtual PC 2007 or Virtual Server 2005R2 and VMWare's Workstation 6.0 of VMWare Server will help you out a lot. I'm a fan of VMWare but I'm currently using VPC2007.

But whatever app you've used or method, that would do. (I guess I need to play with WDS later)

But before we go on and talk about the installation part, which I'll be creating two sections of - normal and unattended - let me first walk you through the bit locker prep thing for ServerCore.



[Side_Notes]
BitLocker - Installation Part

In a nutshell, I did the following to one of my ServerCore installations:
  • Choosing "Repair Now"
  • Diskpart-ing
  • create primary partition size=1500
  • assign letter=S
  • active
  • cre pri par
  • assign letter=C
  • exit
  • format both using QUICK

But I really wanted to know if that was how I should do it.

[/Side_Notes]



What you'll notice different about the ServerCore install, and that of the full installation is that you can change the password for the default Administrator account. Nice change from Beta3 and RC0.

That's actually it. Pretty easy. But what comes next is something rather perplexing, which I'll cover next after a short break.