Премахване на роли и компоненти и работа с команди в режим без графичен интерфейс при Server 2012 / Removal of roles and components and work in command line mode and without graphical user interface in Server 2012
!!!За да изпълните упражнението е необходимо да имате инсталиран софтуер за виртуализация и виртуална машина работеща с Windows Server 2012. Софтуерът за виртуализация използван в текущото упражнение е VMWare vSphere!!!
1. Въведение
- Целта на това практическо упражнение е да се усвоят основните стъпки от процеса по премахване на роли компоненти при Windows Server 2012. Допълнително студентите ще се запознаят с начина на работа с ОС при режим без графичен интерфейс. Студентите ще придобият и затвърдят знанията си за основните конфигурационни особености на ОС Windows Server 2012.
2. Цел на упражнението
- Премахване на компонентите на графичния потребителски интерфейс;
- Запознаване с особеностите на Server Core и работата с команден терминал;
- Изпълнение на команди в терминален режим и добавяне на компоненти и роли чрез командния терминал;
3. Използване на Server Manager за премахване на компоненти и роли
- Стъпка 1. – Стартирайте виртуалната машина
Стъпка 2. – Достъпете операционната система като използвате паролата MAPassword123 за профил Administrator.
Стъпка 3. – След зареждането на Server Manager изберете Manage > Remove Roles and Features. Ще се зареди автоматизираната програма за премахване на роли и компоненти. Изберете Next.
1. Introduction
- The purpose of this exercise is to present to the students the main steps in the role and features removal process in Windows Server 2012. Additionally, the students will learn about the possibility to use the operating system without a graphical user interface. The students will gain new knowledge and will improve their skills about the main configuration specifics of the Windows Server 2012 OS.
2. Aim of the exercise
- Removal of the components of the graphical user interface;
- Introduction to Server Core and to the server control using a command line interface (CLI).
- Execution of commands for adding roles and features using the CLI;
3. Use of the Server Manager for removal of roles and feature
- Step 1. – Start the virtual machine
Step 2. – Access the operation system using the password MAPassword123 for the user Administrator.
Step 3. – After the Server Manager loads on the screen, select Manage > Remove Roles and Features. You will be redirected to the automated tool for removal of roles and components. Select Next.


- Стъпка 4. – Следващата стъпка изисква избиране на сървър, за който да се извърши процеса по премахване на роли и компоненти. Маркирайте локалния сървър и изберете Next.
- Step 4. – The next step requires the selection of a server, which will be the subject of the role and feature removal. Mark the local server and select Next.

- Стъпка 5. – След избора на сървър ще се зареди екрана за маркиране на роли, които да бъдат премахнати. Графичния интерфейс не е роля и не изисква премахването на никакви роли – изберете Next.
- Step 5. – After the selection of the server, the window will present to you the available roles on the server. The graphical interface is not a role and does not require the removal of roles – select Next.

- Стъпка 6. – Следващата стъпка изисква избиране на компоненти, които да се премахнат. Разгледайте списъка и наличните компоненти. Изберете User Interfaces and infrastructure. Ще ви се отворят наличните подкомпоненти. Размаркирайте Graphical Management Tools and Infrastructure. Ще се появи допулнителен прозорец информиращ ви, че този компонент е обвързан с други и трябва да се премахнат и те. Изберете Remove Features. Изберете Next.
- Step 6. – The next step requires the selection of the components, which are needed to be removed. Take a look at the list and the available components. Select User Interfaces and infrastructure. You will see the available sub components. Deselect the Graphical Management Tools and Infrastructure. You will see an additional window, which will inform you that this component is linked to other components and they need to be removed as well. Select Remove Features. Select Next.


- Стъпка 7. – Последната стъпка изисква потвърждение на процеса. Преди да изберете Remove, маркирайте отметката Restart the destination server automatically if required. Това действие ще изведе диалогов прозорец, който ви информира, че ако по време на процеса по премахване на компоненти ОС трябва да се рестартира това ще стане без уведомяване на потребителя. Изберете Yes и Remove.
- Step 7. – The last step requires a confirmation by the user, before the removal process starts. Before selecting Remove, mark the Restart the destination server automatically if required field, as the server will need to restart (Fig. 10). This action will present to you a dialog window, which will inform you that if during the removal process the OS will need to restart, this will be done without further prompts to the user. Select Yes and then Remove.

- Стъпка 8. – Автоматизирания процес по премахване на компонентите ще започне. Системата може да се рестартира няколко пъти
- Step 8. – The automated features removal process will start after the last confirmation. The system might restart several times.


- Стъпка 9. – След рестартирането на виртуалната машина операционната система ще се стартира в конзолен режим.
- Step 9. – After the restart of the virtual machine, the OS will start in the Server Core mode and only the command line interface will be visible.

4. Използване на конзолния интерфейс за добавяне на роли и компоненти
- Стъпка 1. – Въведете командата за стартиране на Windows PowerShell: PowerShell.
4. Adding roles and features using the CLI
- Step 1. – Start the Windows PowerShell using the command PowerShell

- Стъпка 2. – Въведете командата за импортиране на Server Manager – Import-Module ServerManager. Изпълнете командата за преглед на актуалното състояние на компонентите – Get-WindowsFeature. Ще ви се изведе екран с всички налични и възможни за инсталиране компоненти.
- Step 2. – Enter the command for import of the available roles and features from Server Manager – Import-Module ServerManager. Execute the command to explore the current state of the available components – Get-WindowsFeature. You will see a screen with all installed and available for installation components.

- Стъпка 3. – Изпълнете командата Add-WindowsFeature Web-Server -includeallsubfeature. Посредством изпълнението на тази команда ще предизвикате стартирането на автоматизирания процес за добавяне на Web сървър към ОС. След приключване на процеса ще се изиска рестартиране на системата. Изчакайте с тази стъпка. Първо в следващата стъпка ще се добави отново графичен интерфейс към ОС.
- Step 3. – Execute the command Add-WindowsFeature Web-Server -includeallsubfeature. If the command results in failure, please check carefully the command for typing errors. If this cannot solve the issue, please execute the command Add-WindowsFeature Web-Server instead. Thought this command, you will start the authomated process for the installation of the Web server role to the OS. After the completion of the process, the system will restart.


- Стъпка 4. – Изпълнете командата Add-WindowsFeature Server-Gui-Shell, Server-Gui-Mgnt-Infra. Посредством изпълнението на тази команда ще предизвикате стартирането на автоматизирания процес за добавяне на GUI към ОС. След приключването на този процес рестартирайте компютъра посредством PowerShell командата Restart-Computer. По време на повторното зареждане на ОС можете да забележите, че се извършват довършителните задачи по добавянето на IIS, ролята за интернет сървър и графичния интергейс
- Step 4. – Execute the command Add-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra. Through this command you will start the automated process for the installation of the GUI to the OS. After the completion of this process, restart the computer using the PowerShell command Restart-Computer. If you have not restarted the VM in the previous step, the completion of the IIS installation will be done during this restart, as well as the installation of the GUI


- Стъпка 5. – След рестартирането на компютъра можете отново да достъпите операционната система посредством нейния графичен интерфейс. Използвайте Server Manager, за да проверите конфигурацията на ОС. Има ли добавени роли? Проверете с какви IP адреси разполага компютъра (използвайте командата ipconfig –all от командния терминал на сървъра) и проверете функционалността на IIS като заредите началния екран на Web сървъра от локален браузър.
Вие успешно завършихте настоящото упражнение и преминахте през процеса по премахване на роли и компоненти, използването на командния интерфейс и Windows PowerShell и добавянето на компоненти посредством тези пособия
- Step 5. – After the restart of the computer you will again have access to the operating system using its graphical user interface. Use the Server Manager window to check and confirm the configuration of the OS. Are there any roles installed on the server? Check the IP addresses of the server – use the command ipconfig –all from the command line interface (Start -> cmd) and verify the functionality of the IIS by loading the main screen of the web server default web page using a local browser.
!!CONGRATULATIONS!!
You have successfully completed the exercise and you have gone through the process for removal of roles and features. You have also found out how to use the CLI and Windows PowerShell and how to add components and roles from the Windows Server 2012 Server code mode
