Add roles and features wizard windows 7

Adding Roles and Features

So far everything you have done configures the server. So far it does not do anything; it’s not running any roles or features that are the cornerstone of Windows Server 2008.

You don’t have access to the normal Server Manager interface to add roles and features, and all the features, except ADDS, are added via the Ocsetup command. Ocsetup is a case-sensitive command and is part of all Windows Server 2008 installations. Active Directory installation is installed via the dcpromo command, which installs the binaries and configures things via an unattended answer file. You can’t use DCPROMO GUI. You have to use an unattended answer file or command-line switches.

To uninstall roles and features, use the same command but add /uninstall at the end. The exception again is ADDS, which once again uses DCPROMO.

Tables-2 and 3 list the names of the components and what they correspond to in features and roles. However, you can run oclist for a complete list; oclist is a Server Core-specific command. New roles and features will be added to Server Core in the future. For example, WDS support is expected in the Windows Server 2008 R2 timeframe.

Table-2 Server Roles and Ocsetup Names Server Role Ocsetup Name

Server RoleOcsetup Name
Active Directory Lightweight Directory Services (ADAM)DirectoryServices-ADAM-ServerCore
DHCPDHCPServerCore
DNSDNS-Server-Core-Role
Distributed File System ServiceDFSN-Server
Distributed File System Replication (DFSR)DFSR-Infrastructure-ServerEdition
File ServicesFile-Server-Core-Role
File Replication Service (FRS)FRS-Infrastructure
IIS (no ASP.NET)IIS-WebServerRole (plus subcomponents visible via oxlist)
Network File System (NFS)ServerForNFS-Base
Media ServerMediaServer
Hyper-VMicrosoft-Hyper-V
BackupWindowsServerBackup
BitLocker Drive EncryptionBitLocker
BitLocker Remote Admin ToolBitLocker-RemoteAdminTool
Failover ClusterFailoverCluster-Core
Multipath IOMicrosoft-Windows-MultipathIO
NFS ClientClientForNFS-Base
Network Load BalancingNetworkLoadBalancingHeadlessServer
Quality of ServiceQWAVE
Removable Storage ManagementMicrosoft-Windows-RemovableStorageManagementCore
SNMPSNMP-SC
Subsystem for UNIX-bases applicationsSUACore
Telnet ClientTelnetClient
Windows Activation Service (WAS)WAS-WindowsActivationService
WINSWINS-SC

By default, if you execute Ocsetup with a package to install, the command prompt returns instantly while the installation happens in the background, and you will not know when the install has completed. To work around this, run the Ocsetup command after a start /w to tell the command to execute and to wait for the execution to complete.

Let’s install the DNS Server role. During the install, the TrustedInstaller process is activated and responsible for the actual installation.

After you install the role, it is marked as installed in the Optional Component listing, as shown in the following:

In the DNS case, the service could be managed locally via DNSCMD, which is a standard part of the DNS role to facilitate command-line management, or more likely you can run the DNS MMC snap-in on a Vista/2008 box and remotely connect and manage the DNS service on the core installation. For example, the root of the DNS navigation node is right-clicked and the Server Core installation is added, which you can now manage with the GUI remotely.

As with all the remote GUI tools, if you receive an Access Denied error, solve it by performing a net use to the machine before remotely connecting. The command establishes an authenticated session:

A better way is to use cmdkey, which allows credentials to be set for various target systems:

Installing Applications

For the Windows Server 2008 release, Server Core is designed to run inthe- box functions, that is, the supported server roles and features and not additional applications.

None of the major products are supported on Server Core; for example, Exchange, SharePoint, SQL, and so on. For additional applications, there is some planning for the future when managed code support is added to Server Core. However, there are limits to what can be added to Server Core; otherwise, it becomes a normal Windows installation.

Agents should be installable and supportable under Server Core, for example, backup agents, Microsoft Operations Manager (MOM), Systems Management Server (SMS) agents, and so on, which are managed via a remote administrative console function. You can install antivirus agents on Server Core installations and manage them remotely. For example, ForeFront runs on Server Core. Virtual machine additions can be installed and they run fine; in fact, they are recommended. The general rule of thumb is that agents have no shell or GUI dependencies and do not require managed code; if all these are true, the agent runs under Server Core.

To install additional software, execute the setup executables or manually install the MSI files using this command:

To check the installed applications, use the wmic command and the production function as shown in the following:

This output is long, so you need to scroll to see everything.
To uninstall an application, use the wmic command by checking the name of the application and then calling uninstall for it, for example:

In the short term, the only installations you do will likely be agents and antivirus, but who knows what the future will bring?

Источник

Install or Uninstall Roles, Role Services, or Features

Applies To: Windows Server 2012, Windows Server 2012 R2

In Windows ServerВ® 2012 R2 and Windows ServerВ® 2012, the Server Manager console and Windows PowerShellВ® cmdlets for Server Manager allow installation of roles and features to local or remote servers, or offline virtual hard disks (VHDs). You can install multiple roles and features on a single remote server or offline VHD in a single Add Roles and Features Wizard or Windows PowerShell session.

Server Manager cannot be used to manage a newer release of the Windows Server operating system. Server Manager running on Windows Server 2012 or Windows 8 cannot be used to install roles, role services, and features on servers that are running Windows Server 2012 R2.

You must be logged on to a server as an administrator to install or uninstall roles, role services, and features. If you are logged on to the local computer with an account that does not have administrator rights on your target server, right-click the target server in the Servers tile, and then click Manage As to provide an account that has administrator rights. The server on which you want to mount an offline VHD must be added to Server Manager, and you must have Administrator rights on that server.

For more information about what roles, role services, and features are, see Roles, Role Services, and Features.

This topic contains the following sections.

Install roles, role services, and features by using the Add Roles and Features Wizard

In a single session in the Add Roles and Features Wizard, you can install roles, role services, and features on the local server, a remote server that has been added to Server Manager, or an offline VHD. For more information about how to add a server to Server Manager to manage, see Add Servers to Server Manager.

If you are running Server Manager on Windows Server 2012 or Windows 8, you can use the Add Roles and Features Wizard to install roles and features only on servers and offline VHDs that are running Windows Server 2012. If you are running Server Manager on Windows Server 2012 R2 or Windows 8.1, you can use the Add Roles and Features Wizard to install roles and features only on servers and offline VHDs that are running Windows Server 2012 R2.

To install roles and features by using the Add Roles and Features Wizard

If Server Manager is already open, go on to the next step. If Server Manager is not already open, open it by doing one of the following.

On the Windows desktop, start Server Manager by clicking Server Manager in the Windows taskbar.

On the Windows Start screen, click the Server Manager tile.

On the Manage menu, click Add Roles and Features.

On the Before you begin page, verify that your destination server and network environment are prepared for the role and feature you want to install. Click Next.

On the Select installation type page, select Role-based or feature-based installation to install all parts of roles or features on a single server, or Remote Desktop Services installation to install either a virtual machine-based desktop infrastructure or a session-based desktop infrastructure for Remote Desktop Services. The Remote Desktop Services installation option distributes logical parts of the Remote Desktop Services role across different servers as needed by administrators. Click Next.

On the Select destination server page, select a server from the server pool, or select an offline VHD. To select an offline VHD as your destination server, first select the server on which to mount the VHD, and then select the VHD file. For information about how to add servers to your server pool, see Add Servers to Server Manager. After you have selected the destination server, click Next.

Select roles, select role services for the role if applicable, and then click Next to select features.

As you proceed, the Add Roles and Features Wizard automatically informs you if conflicts were found on the destination server that can prevent selected roles or features from installation or normal operation. You are also prompted to add any roles, role services, or features that are required by the roles or features that you have selected.

Additionally, if you plan to manage the role remotely, either from another server, or from a Windows client-based computer that is running Remote Server Administration Tools, you can opt not to install management tools and snap-ins for roles on the destination server. By default, in the Add Roles and Features Wizard, management tools are selected for installation.

On the Confirm installation selections page, review your role, feature, and server selections. If you are ready to install, click Install.

You can also export your selections to an XML-based configuration file that you can use for unattended installations with Windows PowerShell. To export the configuration you specified in this Add Roles and Features Wizard session, click Export configuration settings, and then save the XML file to a convenient location.

You can specify a WIM file as an alternate feature file source when you are installing roles, role services, and features on a running, physical server. The source path for a WIM file should be in the following format, with WIM as a prefix, and the index in which the feature files are located as a suffix: WIM:e:\sources\install.wim:4. However, you cannot use a WIM file directly as a source for installing roles, role services, and features to an offline VHD; you must either mount the offline VHD and point to its mount path for source files, or you must point to a folder that contains a copy of the contents of the WIM file.

After you click Install, the Installation progress page displays installation progress, results, and messages such as warnings, failures, or post-installation configuration steps that are required for the roles or features that you installed. In Windows Server 2012 R2 and Windows Server 2012, you can close the Add Roles and Features Wizard while installation is still in progress, and view installation results or other messages in the Notifications area at the top of the Server Manager console. Click the Notifications flag icon to see more details about installations or other tasks that you are performing in Server Manager.

Install roles, role services, and features by using Windows PowerShell cmdlets

The Server Manager deployment cmdlets for Windows PowerShell function similarly to the GUI-based Add Roles and Features Wizard and Remove Roles and Features Wizard, with an important difference. In Windows PowerShell, unlike in the Add Roles and Features Wizard, management tools and snap-ins for a role are not included by default. To include management tools as part of a role installation, add the IncludeManagementTools parameter to the cmdlet. If you are installing roles and features on a server that is running the Server Core installation option of Windows Server 2012 R2 or Windows Server 2012, you can add a role’s management tools to an installation, but GUI-based management tools and snap-ins cannot be installed on servers that are running the Server Core installation option of Windows Server. Only command-line and Windows PowerShell management tools can be installed on the Server Core installation option.

To install roles and features by using the Install-WindowsFeature cmdlet

Do one of the following to open a Windows PowerShell session with elevated user rights.

If you are installing roles and features on a remote server, you do not need to run Windows PowerShell with elevated user rights.

On the Windows desktop, right-click Windows PowerShell on the taskbar, and then click Run as Administrator.

On the Windows Start screen, right-click the tile for Windows PowerShell, and then on the app bar, click Run as Administrator.

In Windows PowerShell 3.0 and later releases of Windows PowerShell, there is no need to import the Server Manager cmdlet module into the Windows PowerShell session before running cmdlets that are part of the module. A module is automatically imported the first time you run a cmdlet that is part of the module. Also, neither Windows PowerShell cmdlets nor the feature names used with the cmdlets are case-sensitive.

Type Get-Help Install-WindowsFeature, and then press Enter to view the syntax and accepted parameters for the Install-WindowsFeature cmdlet.

Type the following, and then press Enter, where feature_name represents the command name of a role or feature that you want to install (obtained in step 2), and computer_name represents a remote computer on which you want to install roles and features. Separate multiple values for feature_name by using commas. The Restart parameter automatically restarts the destination server if required by the role or feature installation.

To install roles and features on an offline VHD, add both the ComputerName parameter and the VHD parameter. If you do not add the ComputerName parameter, the cmdlet assumes that the local computer is mounted to access the VHD. The ComputerName parameter contains the name of the server on which to mount the VHD, and the VHD parameter contains the path to the VHD file on the specified server.

Example:В В The following cmdlet installs the Active Directory Domain Services role and the Group Policy Management feature on a remote server, ContosoDC1. Management tools and snap-ins are added by using the IncludeManagementTools parameter, and the destination server is to be restarted automatically, if installation requires that the servers be restarted.

Remove roles, role services, and features by using the Remove Roles and Features Wizard

You must be logged on to a server as an administrator to uninstall roles, role services, and features. If you are logged on to the local computer with an account that does not have administrator rights on your uninstallation target server, right-click the target server in the Servers tile, and then click Manage As to provide an account that has administrator rights. The server on which you want to mount an offline VHD must be added to Server Manager, and you must have Administrator rights on that server.

To remove roles and features by using the Remove Roles and Features Wizard

If Server Manager is already open, go on to the next step. If Server Manager is not already open, open it by doing one of the following.

On the Windows desktop, start Server Manager by clicking Server Manager in the Windows taskbar.

On the Windows Start screen, click the Server Manager tile.

On the Manage menu, click Remove Roles and Features.

On the Before you begin page, verify that you have prepared for removing roles or features from a server. Click Next.

On the Select destination server page, select a server from the server pool, or select an offline VHD. To select an offline VHD, first select the server on which to mount the VHD, and then select the VHD file.

For information about how to add servers to your server pool, see Add Servers to Server Manager. After you have selected the destination server, click Next.

You can use the Remove Roles and Features Wizard to remove roles and features from servers that are running the same release of Windows Server that supports the version of Server Manager that you are using. You cannot remove roles, role services, or features from servers that are running Windows Server 2012 R2, if you are running Server Manager on Windows Server 2012 or Windows 8. You cannot use the Remove Roles and Features Wizard to remove roles and features from servers that are running Windows Server 2008, Windows Server 2008 R2, or Windows Server 2003.

Select roles, select role services for the role if applicable, and then click Next to select features.

As you proceed, the Remove Roles and Features Wizard automatically prompts you to remove any roles, role services, or features that cannot run without the roles or features that you are removing.

Additionally, you can opt to remove management tools and snap-ins for roles on the destination server. By default, in the Remove Roles and Features Wizard, management tools are selected for removal. You can leave management tools and snap-ins if you plan to use the selected server to manage the role on other remote servers.

On the Confirm removal selections page, review your role, feature, and server selections. If you are ready to remove the roles or features, click Remove.

After you click Remove, the Removal progress page displays removal progress, results, and messages such as warnings, failures, or post-removal configuration steps that are required, such as restarting the destination server. In Windows Server 2012 R2 and Windows Server 2012, you can close the Remove Roles and Features Wizard while removal is still in progress, and view removal results or other messages in the Notifications area at the top of the Server Manager console. Click the Notifications flag to see more details about removals or other tasks that you are performing in Server Manager.

Remove roles, role services, and features by using Windows PowerShell cmdlets

The Server Manager deployment cmdlets for Windows PowerShell function similarly to the GUI-based Remove Roles and Features Wizard, with an important difference. In Windows PowerShell, unlike in the Remove Roles and Features Wizard, management tools and snap-ins for a role are not removed by default. To remove management tools as part of a role removal, add the IncludeManagementTools parameter to the cmdlet. If you are uninstalling roles and features from a server that is running the Server Core installation option of Windows Server 2012 R2 or Windows Server 2012, this parameter removes command-line and Windows PowerShell management tools for the specified roles and features.

To remove roles and features by using the Uninstall-WindowsFeature cmdlet

Do one of the following to open a Windows PowerShell session with elevated user rights.

If you are uninstalling roles and features from a remote server, you do not need to run Windows PowerShell with elevated user rights.

On the Windows desktop, right-click Windows PowerShell on the taskbar, and then click Run as Administrator.

On the Windows Start screen, right-click the Windows PowerShell tile, and then on the app bar, click Run as Administrator.

In Windows PowerShell 3.0 and later releases of Windows PowerShell, there is no need to import the Server Manager cmdlet module into the Windows PowerShell session before running cmdlets that are part of the module. A module is automatically imported the first time you run a cmdlet that is part of the module. Also, neither Windows PowerShell cmdlets nor the feature names used with the cmdlets are case-sensitive.

Type Get-Help Uninstall-WindowsFeature, and then press Enter to view the syntax and accepted parameters for the Uninstall-WindowsFeature cmdlet.

Type the following, and then press Enter, where feature_name represents the command name of a role or feature that you want to remove (obtained in step 2), and computer_name represents a remote computer from which you want to remove roles and features. Separate multiple values for feature_name by using commas. The Restart parameter automatically restarts destination servers if required by the role or feature removal.

To remove roles and features from an offline VHD, add both the ComputerName parameter and the VHD parameter. If you do not add the ComputerName parameter, the cmdlet assumes that the local computer is mounted to access the VHD. The ComputerName parameter contains the name of the server on which to mount the VHD, and the VHD parameter contains the path to the VHD file on the specified server.

Example:В В The following cmdlet removes the Active Directory Domain Services role and the Group Policy Management feature from a remote server, ContosoDC1. Management tools and snap-ins are also removed, and the destination server is to be restarted automatically, if removal requires that the servers be restarted.

Install roles and features on multiple servers by running a Windows PowerShell script

Although you cannot use the Add Roles and Features Wizard to install roles, role services, and features on more than one target server in a single wizard session, you can use a Windows PowerShell script to install roles, role services, and features on multiple target servers that you are managing by using Server Manager. The script that you use to perform batch deployment, as this process is called, points to an XML configuration file that you can create easily by using the Add Roles and Features Wizard, and clicking Export configuration settings after advancing through the wizard to the Confirm installation selections page of the Add Roles and Features Wizard.

All target servers that are specified in your script must be running the release of Windows Server that matches the version of Server Manager you are running on the local computer. For example, if you are running Server Manager on WindowsВ® 8, you can install roles, role services, and features on servers that are running Windows Server 2012. If GUI-based management tools are added to the installation, the installation process automatically converts target servers that are running the Server Core installation option of Windows Server to the full installation option (server with a full GUI). The script provided in this section is an example of how batch deployment can be performed by using the Install-WindowsFeature cmdlet and a Windows PowerShell script. There are other possible scripts and methods of performing batch deployment to multiple servers. To search for or provide other scripts for deploying roles and features, search the Script Center Repository.

To install roles and features on multiple servers

If you have not already done so, create an XML configuration file that contains the roles, role services, and features that you want installed on multiple servers. You can create this configuration file by running the Add Roles and Features Wizard, selecting roles, role services, and features that you want, and clicking Export configuration settings after advancing through the wizard to the Confirm installation selections page. Save the configuration file to a convenient location. You do not need to click Install or complete the wizard if you are running it only to create a configuration file.

Do one of the following to open a Windows PowerShell session with elevated user rights.

On the Windows desktop, right-click Windows PowerShell on the taskbar, and then click Run as Administrator.

On the Windows Start screen, right-click the Windows PowerShell tile, and then on the app bar, click Run as Administrator.

Copy and paste the following script into your Windows PowerShell session.

Target servers are automatically restarted if required by the roles and features that you select.

Run the function by doing the following.

Do one of the following to open a Windows PowerShell session with elevated user rights.

If you are installing roles and features from a remote server, you do not need to run Windows PowerShell with elevated user rights.

On the Windows desktop, right-click Windows PowerShell on the taskbar, and then click Run as Administrator.

On the Windows Start screen, right-click the Windows PowerShell tile, and then on the app bar, click Run as Administrator.

On a server that is running the Server Core installation option of Windows Server 2012 R2 or Windows Server 2012, type powershell into a command prompt, and then press Enter.

Type the following command, and then press Enter. In the following example, the source files are located in a side-by-side store (abbreviated to as SxS) in installation media on drive D.

If you want the command to use Windows Update as a source for missing feature files, or if a default source has already been configured by using Group Policy, you do not need to add the Source parameter unless you want to specify a different source.

On the Manage menu in Server Manager, click Add Roles and Features.

Select a destination server that is running Windows Server 2012 R2 orWindows Server 2012.

On the Select features page of the Add Roles and Features Wizard, select .NET Framework 3.5.

If the local computer is allowed to do so by Group Policy settings, the installation process attempts to get missing feature files by using Windows Update. Click Install; you do not need to go on to the next step.

Provide a path to a side-by-side store (referred to as SxS) in installation media, or to a WIM file. In the following example, installation media is located on drive D.

D:\Sources\SxS\

To specify a WIM file, add a WIM: prefix, and add the index of the image to use in the WIM file as a suffix, as shown in the following example.

WIM:\\server_name\share\install.wim:3

Click OK, and then click Install.

Do one of the following to open a Windows PowerShell session with elevated user rights.

If you are installing roles and features from a remote server, you do not need to run Windows PowerShell with elevated user rights.

On the Windows desktop, right-click Windows PowerShell on the taskbar, and then click Run as Administrator.

On the Windows Start screen, right-click the Windows PowerShell tile, and then on the app bar, click Run as Administrator.

On a server that is running the Server Core installation option, type powershell into a command prompt, and then press Enter.

Run one of the following DISM commands.

If the computer has access to Windows Update, or a default source file location has already been configured in Group Policy, run the following command.

If the computer has access to installation media, run a command similar to the following. In the following example, the operating system installation media is located on drive D. The LimitAccess parameter prevents the command from attempting to contact Windows Update or a server that is running WSUS.

The DISM command is case-sensitive.

Configure alternate sources for feature files in Group Policy

You must be a member of the Administrators group to change Group Policy settings on the local computer. If Group Policy settings for the computer you want to manage are controlled at the domain level, you must be a member of the Domain Administrators group to change Group Policy settings.

To configure a default alternate source path in Group Policy

In Local Group Policy Editor or Group Policy Management Console, open the following policy setting.

Computer Configuration\Administrative Templates\System\Specify settings for optional component installation and component repair

Select Enabled to enable the policy setting, if it is not already enabled.

In the Alternate source file path text box in the Options area, specify a fully qualified path to a shared folder or a WIM file. To specify a WIM file as an alternate source file location, add the prefix WIM: to the path, and add the index of the image to use in the WIM file as a suffix. The following are examples of values that you can specify.

Path to a shared folder: **\\server_name\share\**folder_name

Path to a WIM file, in which 3 represents the index of the image in which the feature files are found: WIM:\\server_name\share\install.wim:3

If you do not want computers that are controlled by this policy setting to search for missing feature files in Windows Update, select Never attempt to download payload from Windows Update.

If the computers that are controlled by this policy setting typically receive updates through WSUS, but you prefer to go through Windows Update and not WSUS to find missing feature files, select Contact Windows Update directly to download repair content instead of Windows Server Update Services (WSUS).

Click OK when you are finished changing this policy setting, and then close the Group Policy editor.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *