All Products
Search
Document Center

Windows Server version 1709 image and instance management

Last Updated: Oct 25, 2018

The Windows Server version 1709 image is currently available in Elastic Compute Service (ECS). This image is available in the list of Window Server images when you create an ECS instance. Windows Server version 1709 runs in Server Core mode and is entirely command-line based. It offers some significant advantages, including lower hardware requirements, a reduction in the need for updates, and capability of remote management.

This topic describes how to use and manage ECS instances running Windows Server version 1709, including how to copy files to the instances, stop or restart the instances from inside the guest OS, enable Internet Information Services (IIS), and restart a command prompt window that was accidentally closed during an RDP session.

Management tools

Windows Server version 1709 instances exclude the Resource Manager, Control Panel, and Windows Explorer. The instances do not support the *.msc command-line option, such as devmgmt.msc. You can manage servers using tools such as Sconfig, Server Manager, PowerShell, and Windows Admin Center.

Windows Server version 1709 runs in Server Core mode. We recommend that you use advanced management tools, such as PowerShell and Windows Admin Center.

PowerShell for remote management

PowerShell allows you to remotely manage Windows instances in the same way as the Secure Shell (SSH) feature. Remote management is enabled by using .NET Framework to develop object-oriented scripts. You can follow these steps to remotely manage the instances using PowerShell. In this example, the public IP address of the instance is 172.16.1XX.183.

  1. Remotely connect to the Windows Server 1079 instance.

  2. Start PowerShell by entering PowerShell in the command prompt window.

  3. Run the following commands in the instance PowerShell.

    1. Enable-PSRemoting -Force
    2. Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP-PUBLIC" -RemoteAddress Any

    Powershell

  4. Add security group rules to enable instance access through ports 5985 (HTTP) and 5986 (HTTPS). For more information, see Add security group rules.

  5. Start PowerShell by entering PowerShell in the command prompt window of your client.

  6. Run the following command in the client PowerShell.

    1. Set-Item WSMan:localhost\client\trustedhosts -value 172.16.1XX.183 -Force

    Note: 172.16.1XX.183 in the command indicates that only your instances are trusted. You can use the asterisk (“*”) to indicate that all computers are trusted.

  7. Run the command in your client PowerShell and change 172.16.1XX.183 to the target IP address.

    1. Enter-PSSession '172.16.1XX.183' -Credential 'administrator'
  8. Enter the instance password as required and click OK.

Now you can manage your Windows Server 1709 instances on the client PC by PowerShell.

Windows Admin Center

Windows Admin Center (WAC) is a browser-based GUI management tool. It can replace server management tools or Microsoft Management Console (MMC) when Server Core mode is used. Follow these steps to install Windows Admin Center. In this example, the public IP address of the instance is 172.16.1XX.184.

To install Windows Admin Center through a browser, you must complete installation on your client. Therefore, make sure that you can manage instances using PowerShell in advance. For more information, see PowerShell for remote management.

Note: WAC can be supported only on Windows 10 and Windows Server 2016 operating systems. For more information, see the official announcement of Microsoft.

Prerequisites

  • You must have added security group rules to enable instance access to ports 5985 (HTTP) and 5986 (HTTPS). For more information, see Add security group rules.

  • You must have enabled the WAC hosted server to remotely manage the Windows Server 1709 instances using PowerShell. For more information, see PowerShell for remote management.

Step 1: Install Windows Admin Center using commands on Windows Server 2016 instance

  1. Remotely connect to the Windows Server 2016 instance.

  2. Start PowerShell by entering PowerShell in the command prompt window.

  3. Run the following commands in the instance PowerShell:

    1. Enable-PSRemoting -Force
    2. Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP-PUBLIC" -RemoteAddress Any
  4. Run the following command to download Windows Admin Center. If the http://aka.ms/WACDownload address expires, you can navigate to the Microsoft Windows Admin Center and download the latest WAC installer package.

    1. Invoke-WebRequest -Uri "http://aka.ms/WACDownload" -OutFile "C:\Users\Administrator\Documents\WindowsAdminCenter"
    2. msiexec /i C:\Users\Administrator\Documents\WindowsAdminCenter /qn /L*v log.txt SME_PORT=443 SSL_CERTIFICATE_OPTION=generate
  5. Run the cat log.txt command to query the download progress. Windows Admin Center has been successfully downloaded if the following information is displayed in the log.

    1. MSI (s) (14:44) [09:48:37:885]: Product: Project 'Honolulu'(Technical Preview) -- Installation completed successfully.
    2. MSI (s) (14:44) [09:48:37:885]: Windows Installer installed the product. Product name: Project 'Honolulu' (Technical Preview). Product Version: 1.1.10326.0. Product Language: 1033. Manufacturer: Microsoft Corporation. Installation success or error status: 0.
  6. Run the installation by following the default settings, and remember the specified communication port during the installation wizard. In this sample, the default communication port is 6516.

Step 2: Use Windows Admin Center in a browser

  1. Add security group rules for the Windows Server 2016 instance to enable instance access to ports 6516 (HTTP). For more information, see Add security group rules.

  2. In the Windows Server 2016 instance, open https://localhost:6516/ in Microsoft Edge or Chrome, the dashboard of WAC is displayed automatically.

  3. Click Add > Add Server Connection, enter the IP address or the host name of the Windows Server 1709 instance in the Server Name entry.

  4. After the WAC finds the available options, click Submit to add a connection.

    AddServer

Now you can use Windows Admin Center on the client device to manage instances through Microsoft Edge or Chrome.

FAQs and troubleshooting

How can I copy files to Windows Server version 1709 instance?

If the files to be copied are stored in your client device and Windows Admin Center is installed, or remotely managing instances with PowerShell is configured, you can copy files to the instance using any of the following three methods.

RDP application

  1. Remotely connect to the Windows instance.

  2. Start PowerShell by entering PowerShell in the instance command prompt window.

  3. Copy the target files on your client.

  4. Enter notepad in the instance command prompt window.

  5. In the displayed window, select File > Open. Then, specify a path and right-click Paste.

    PasteFiles

PowerShell for remote management

  1. Start the target Windows instance.

  2. Open the command prompt window on the client PC, and enter PowerShell in the window to start PowerShell.

  3. Remotely manage the target instance using PowerShell. For more information, see PowerShell for remote management.

  4. Run the following command on the client PC.

    1. $session = New-PSSession -ComputerName 172.16.1XX.183
    2. Copy-Item -ToSession $session -Path C:\1.txt -Destination c:\2.txt

    Note: In the preceding commands:

    • 172.16.1XX.183 must be changed to the target IP address,
    • C:\1.txt is the path of the file on the client PC.
    • C:\2.txt is the path of the directory in which the file is pasted on the Windows instance.

Windows Admin Center

  1. Connect to the Windows Server 2016 instance or Windows 10 instance.

  2. Install WAC installed and establish PowerShell remote management with the Windows Server 1709 instance. For more information, see Windows Admin Center.

  3. Start Windows Admin Center and enter the target Windows Server 1709 instance.

  4. Click File > More > Upload > Browse, select a file to be copied, and click Open > Submit.

    CopyFiles

How do I internally stop or restart the Windows Server version 1709 instance?

RDP application

  1. Remotely connect to the Windows instance.

  2. In the command prompt window, enter sconfig and select 13 for restarting the instance or 14 for stopping the instance, and then press Enter.

PowerShell

  1. Remotely connect to the Windows instance.

  2. Enter PowerShell in the command prompt window to start PowerShell.

  3. Run one of the following commands to restart or stop the instance.

    1. shutdown -r -t 00 :: This command restarts the instance in 0 seconds.
    2. shutdown -s -t 00 :: This command stops the instance in 0 seconds.
    3. Stop-Computer -Force # This PowerShell command stops the instance instantly.
    4. Restart-Computer -Force # This PowerShell command restarts the instance instantly.

PowerShell for remote management

  1. Start the target Windows instance.

  2. Open the command prompt window on the client PC, and enter PowerShell in the window to start PowerShell.

  3. Remotely manage the target instance using PowerShell. For more information, see PowerShell for remote management.

  4. Run the required PowerShell command on the client device after you change 172.16.1XX.183 to the target IP address.

    1. Enter-PsSession ComputerName 172.16.1XX.183
    2. Restart-Computer -Force # Restart
    3. Stop-Computer -Force # Stop

Windows Admin Center

  1. Connect to the Windows Server 2016 instance or Windows 10 instance.

  2. Install WAC installed and establish PowerShell remote management with the Windows Server 1709 instance. For more information, see Windows Admin Center.

  3. Start Windows Admin Center and enter the target Windows Server 1709 instance.

  4. Start Windows Admin Center and select the target instance.

  5. Select Overview and click Restart or Stop as required.

    Restart

How do I enable Internet Information Services (IIS)?

RDP application

  1. Remotely connect to the Windows instance.

  2. Enter PowerShell in the command prompt window to start PowerShell.

  3. Run the following commands to install IIS.

    1. Import-Module ServerManager
    2. Add-WindowsFeature Web-Server, Web-CGI, Web-Mgmt-Console

PowerShell for remote management

  1. Start the target Windows instance.

  2. Open the command prompt window on the client computer, and enter PowerShell in the window to start PowerShell.

  3. Remotely manage the target instance using PowerShell. For more information, see PowerShell for remote management.

  4. Run the following PowerShell commands on the client PC.

    1. Enter-PsSession ComputerName 172.16.1XX.183
    2. Import-Module ServerManager
    3. Add-WindowsFeature Web-Server, Web-CGI, Web-Mgmt-Console

Windows Admin Center

  1. Connect to the Windows Server 2016 instance or Windows 10 instance.

  2. Install WAC installed and establish PowerShell remote management with the Windows Server 1709 instance. For more information, see Windows Admin Center.

  3. Start Windows Admin Center and enter the target Windows Server 1709 instance.

  4. Select Roles & features > Web Server (IIS) > Install, choose from the available features as required and click Yes.

    Roles&Features

How do I restart a command prompt window that was accidentally closed during an RDP session?

If the command prompt window is accidentally closed during an RDP session, the remote application experiences a black screen and operations cannot be performed. In this scenario, you can follow these steps:

  1. If an MSTSC connection is used, press Ctrl+Alt+End. In other scenarios, press Ctrl+Alt+Del.

  2. Click Task Manager on the page that appears, and press Enter.

  3. In the Task Manager window, select Files > New Task (Run…). In the displayed dialog box, enter cmd and then click OK.

    New process

References