Before getting into how to use DSC to configure a Nano Server, you must create a Nano Server image that includes the Microsoft-NanoServer-DSC-Package package.
DSC on Nano Server is an optional package that is available in the NanoServer\Packages folder of the Windows Server 2016 media. The package can be added when you create a VHD(X) for a Nano Server by specifying Microsoft-NanoServer-DSC-Package as the value of the packages parameter of the New-NanoServerImage function, or by using NanoServerPackage provider online post deployment.
In the following example, we are creating five virtual machines; the script would look like the following:
#region variables# Staging path for new Nano image$StagingPath='C:\'# ...