programming4us
programming4us
DESKTOP

Windows Server 2008 Server Core : Accessing the Windows Package Manager with the PkgMgr Utility, Adding and Removing Applications with the OCSetup Utility

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
10/4/2012 3:43:31 AM

1. Accessing the Windows Package Manager with the PkgMgr Utility

The PkgMgr helps you service the operating system by installing and uninstalling both new packages and package updates. This utility uses the following syntax:

PkgMgr /ip [/m:Directory] /p:PackageName [/o:[BootPath]WinDirectory]
   [/n:Filename] [/s:Sandbox] [/quiet] [/norestart] [/l:LogFile]
PkgMgr /up [/m:Directory] /p:PackageName [/o:[BootPath]WinDirectory]
   [/n:Filename] [/quiet] [/norestart] [/l:LogFile]
PkgMgr /up PackageName [, PackageName...] [/o:[BootPath]WinDirectory]
   [/n:Filename] [/quiet] [/norestart] [/l:LogFile]
PkgMgr /iu PackageName [, PackageName...] [/o:[BootPath]WinDirectory]
   [/n:Filename] [/s:Sandbox] [/quiet] [/norestart] [/l:LogFile]
PkgMgr /uu PackageName [, PackageName...] [/o:[BootPath]WinDirectory]
   [/n:Filename] [/quiet] [/norestart] [/l:LogFile]

The following list describes each of the command line arguments.


PackageName

Specifies the name of the package that you want to work with.


/m:
Directory

Specifies the location of the package. The default location is the current directory.


/p

Specifies the name of a single package.


/o:
[BootPath]WinDirectory

Performs an offline action on the Windows image.


/n: Filename

Provides the name of a file that contains automated responses to installation requirements.


/s:
Sandbox

Provides the name of a sandbox directory on the system where the application should extract files prior to checking them for viruses and other problematic code.


/quiet

Performs the required task without a user interface.


/norestart

Suppresses the restart at the end of the installation.


/l:
LogFile

Logs all actions to the specified log file.


/ip

Installs one or more packages.


/up

Uninstalls one or more packages.


/iu

Installs a package update. The package must exist on the system or this command generates an error.


/uu

Uninstalls a package update. The original package and the package update must exist on the system or this command generates an error.

2. Adding and Removing Applications with the OCSetup Utility

Microsoft has changed the way that you manage Windows Server 2008. You now need to consider whether an option you want to add or remove is a role or a feature. A role is a major part of the server, such as providing file services. On the other hand, a feature augments basic server functionality. For example, the Telnet Client is a feature because it doesn't actually provide a new role for the server—it doesn't change the way in which you interact with the server in the same way that adding the File Services role does. This change affects both the graphical version of the product as well as Server Core. While you can use the Server Manager to add or remove roles and features when working with the graphical version, you must perform this task at the command line with working with Server Core. Needless to say, performing this task at the command line is more difficult than checking a box in a graphical utility. The following sections describe how to work with the OCSetup utility.

NOTE

You may have heard rumors about the amazing new ServerManagerCmd utility. This utility is no rumor and it really does work well. The only problem is that the ServerManagerCmd utility relies on the .NET Framework to do its work. At this time, Server Core won't have the required support installed as part of the product. Consequently, you must rely on the OCSetup and OCList utilities to perform setup tasks.

2.1. An Overview of the Server Core Roles and Features

Server Core provides fewer roles and features than the graphical version of Windows Server 2008. You can always list the roles and features that Server Core supports using the OCList utility . Remember that roles define the major tasks you can perform with Server Core. Here's a list of the roles supported by the Enterprise Edition of Server Core.

  • Active Directory Domain Services

  • Active Directory Lightweight Directory Services (AD LDS)

  • Dynamic Host Configuration Protocol (DHCP) Server

  • DNS Server

  • File Services

  • Print Server

  • Streaming Media Services

  • Web Server (IIS)

Server Core also supports a number of standard features. Remember that a feature provides additional functionality, but doesn't change the major tasks you perform with Server Core. For example, installing Windows Backup adds to the functionality that Server Core provides, but it doesn't change the fact that your Server Core setup only provides file and print services. Here's the list of features supported by the Enterprise Edition of Server Core.

  • Microsoft Failover Cluster

  • Network Load Balancing

  • Subsystem for UNIX-based Applications

  • Windows Backup

  • Multipath I/O

  • Removable Storage Management

  • Windows Bitlocker Drive Encryption

  • Simple Network Management Protocol (SNMP)

  • Windows Internet Naming Service (WINS)

  • Telnet Client

  • Quality of Service (QoS)

Because Server Core doesn't provide any support for the graphical installation utilities, you must use OCSetup to install or uninstall any of the roles or features. In a few cases, installing a role or feature will require a reboot, just as they do when working with the graphical version of Windows Server 2008. In addition, you may need to reboot the system when uninstalling a role or feature.

2.2. Considering the Server Core Default Settings

It's important to remember that Server Core has a default setup. No matter which edition of Server Core you install, you can count on it having certain characteristics when you complete the installation, which makes the task of working with roles and features considerably easier. Table 1shows the default settings for a Server Core installation.

Table 1. Essential Windows Server 2008 Default Settings
Setting NameDefault SettingDescription
Administrator PasswordBlankProvides default access to the system. The system is wide open when you start, so setting the password is a must-do item.
Computer NameRandom ValueDefines the computer's name on the network and provides the name others will use to access the computer. The random name that Microsoft provides will be hard to use.
Domain MembershipThe computer is joined to a workgroup named WORKGROUPDefines the computer's connectivity on the network. For a small company or a group within an enterprise, a workgroup may be fine, but most organizations will rely on a domain.
Windows UpdateOffAutomatically updates the computer as needed. You need to turn on this feature after performing the initial update to ensure the server receives required updates.
Network ConnectionsSet to obtain their IP address using Dynamic Host Configuration Protocol (DHCP)Using DHCP is a standard for domains because you must have a DHCP server to set up a domain. A workgroup with a shared Internet connection will also have a DHCP host. However, some workgroups will still require manual IP configuration.
Windows FirewallOnProvides security for incoming and outgoing network traffic. The default Windows Firewall configuration is set to disallow any form of network traffic to ensure that no one can access the server while you configure it. Change this setting after initial server configuration, but before you attempt to download updates and fixes.
RolesNone InstalledSpecifies the tasks that the server can perform. If you don't define any roles, the server looks more like a workstation than a server. In fact, it doesn't even make a good workstation.

2.3. Using the OCSetup Utility

Once you know the status of roles and features on your server and determine that you need to either install or uninstall a role or feature, you can use OCSetup to perform the task. This utility uses the following syntax:

OCSetup Component [/Uninstall] [/Passive] [/UnattendFile:Filename]
   [/Quiet] [/NoRestart] [/Log:Filename] [/X:Parameters]

The following list describes each of the command line arguments.


Component

Specifies the name of the role or feature that you want to install. You must always provide a component name. The best way to obtain a component name is to use the OCList utility . You can also use the OCList utility to ensure that you haven't already installed the component.

When you want to install a new component, all you need to do is provide the component name. For example, if you want to install Windows Backup, you'd type OCSetup WindowsServerBackup and press Enter. You won't actually see any messages unless OCSetup needs additional information. The command prompt returns to normal almost immediately after you enter the command. The only easy way to determine whether the installation is successful is to use the OCList utility to check the status.


/Uninstall

Removes the specified component. For example, if you type OCSetup WindowsServerBackup /Uninstall and press Enter, OCSetup removes the Windows Backup feature. In many cases, removing a component requires a reboot. If you don't use the /NoRestart command line switch, Server Core assumes you want to restart the system immediately. For example, if you want to uninstall Windows Backup and don't want the server to reboot, then you must type OCSetup WindowsServerBackup /Uninstall /NoReboot and press Enter. Consequently, you must make sure you want to restart the system or you must use the /NoRestart command line switch.


/Passive

Allows the installation or uninstallation tasks to progress without displaying any user messages. You still receive status messages.


/UnattendFile:
Filename

Defines the name of unattended installation file. You can use this file to perform multiple installs or uninstalls without entering the commands individually.


/Quiet

Allows the installation or uninstallation tasks to progress without displaying any messages (user or status).


/NoRestart

Prevents the system from restarting after performing an install or uninstall task, even if the task requires a restart. Although preventing the restart keeps users happy, it also means that the role or feature you've installed or uninstalled isn't complete. You can't use the role or feature until you manually restart the server.


/Log:
Filename

Defines an alternative location for the installation log. You won't normally want to use this command line switch.


/X:
Parameters

Defines any parameters needed to install a particular component successfully. If you don't provide the parameters, OCSetup queries you for them. The parameters depend on the component you want to install. Some components, such as Windows Backup, don't require any parameters at all.

Other  
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
REVIEW
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
programming4us
 
 
programming4us