How to connect and configure IIS running on Nano

If you have not already reviewed my other articles on using IIS on Nano, then you might want to take a look at them.  Just so you know the perspective I am coming from and the context in which I work within.

After you have created the Nano server and boot it up, you will get to a console that looks something like that shown in Figure 1.

image

Figure 1, how to configure IIS on a Nano server

You use the credentials which were used to create the VHD to login.  This approach only allows you to set some Network, Firewall, WinRM, etc.… configurations, see Figure 2.  Nano does not have any console or GUI to perform any configuration.  All of it must be done remotely using, for example PowerShell.  You do need to login and get the IP address because it is needed to configure any remote management tool.

image

Figure 2, how to configure access the Nano server, Nano Server Recovery Console

Initially, when I tried to connect with PowerShell using the Enter-PSSession cmdlet I received an error stating:

Enter-PSSession : Connecting to remote server 10.###.###.202 failed with the following error message : The WinRM client cannot process the request. Default
authentication may be used with an IP address under the following conditions: the transport is HTTPS or the destination is in the TrustedHosts list, and explicit
credentials are provided. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. For more information
on how to set TrustedHosts run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.

To resolve the issue I execute the following command, also shown in Figure 3.

winrm set winrm/config/client ‘@{TrustedHosts=”*******”}’

image

Figure 3, The WinRM client cannot process the request

Once I ran the above command, I execute the Enter-PSSession cmdlet again, and as shown in Figure 4, I was prompted and able to login.

Enter-PSSession -ComputerName 10.###.###.202 -Credential ######

image

Figure 4, Remote manage IIS on Nano, remote connect to Nano

Once you have made the remote connection, you can execute some IISAdministration PowerShell cmdlets and install/view some additional IIS features.  See Figure 5.

image

Figure 5, configure IIS running on Nano server

You can use any of the IISAdministration cmdlets to administer IIS on Nano, as shown in Figure 6.

image

Figure 6, configure IIS running on Nano server using IISAdministration

Examples and more information about the IISAdministration module can be found here.