Getting Started with Nano Server
上QQ阅读APP看书,第一时间看更新

Advanced settings

The New-NanoServerImage supports an extended set of advanced parameters as well:

  • -MaxSize: If you need larger images, you can supply -MaxSize to create a larger, dynamically expanding VHD(X) (that is, MaxSize 100 GB). If you don't use this parameter, the default disk size is 4 GB.
  • -LogPath: This parameter sets the location where you want to save the logs created while building the Nano image.
  • -EnableRemoteManagementPort: If you need to open port 5985 for inbound TCP traffic to connect using WinRM from a different subnet.
  • -MergePath: If you need to embed your own script or binaries into the Nano Server image, you can supply -MergePath to copy a file or a directory into the root of the image (that is, -MergePath .\tools).
  • -EnableEMS: This enables EMS and boot EMS on the image. See Chapter 10, Running Other Workloads on the Nano Server, for more information.
  • -EMSPort: This is the port on which to enable the EMS. The default is 1.
  • -EMSBaudRate:  This is the baud rate to use for EMS. The default is 115200 bps.
  • -DomainName: This joins the image to the specified domain performing an offline join. For more information, see the domain join in Chapter 3, Deploying Nano Server in a Virtual Machine and on Physical Hardware.
  • -ReuseDomainNode: When joining a domain, reuse a node with the same name if it exists already in the domain.
  • -ServicingPackagePath: With this parameter, you can add servicing packages that you download from the Microsoft update catalog (multiple packages are possible at once, added as a comma separated list; these packages should be extracted from .msu to .cab format).
  • -SetupComplete-Command: With this parameter, you can add custom commands as part of setupcomplete.cmd. See Customizing a Nano Server Image Using DISM in this chapter for more information.
  • -UnattendPath: With this parameter, you can add the location of your own custom unattend.xml file. See Customizing a Nano Server Image Using DISM in this chapter for more information.
  • -Package: This is the specific parameter that adds the packages that don't have a specific parameter. See the Adding Packages section in this chapter for more information.
  • -OEMDrivers: This is the specific parameter that adds the OEM drivers package. These drivers are the same set of drivers that exist in Server Core, which includes a variety of network and storage controller drivers.
  • -SetupUI: This parameter is brought about the same way as with the packages choice. This is used internally by the Nano Server image builder, and the recommended method is still to use the -Package parameter (see Building and customizing a Nano Server image using Nano Server image builder section for more information).