Using DSC on Nano Server
Applies To: Windows PowerShell 5.0
DSC on Nano Server is an optional package in the NanoServer\Packages
folder of the Windows
Server 2016 media. The package can be installed when you create a VHD for a Nano Server by
specifying Microsoft-NanoServer-DSC-Package as the value of the Packages parameter of the
New-NanoServerImage function. For example, if you are creating a VHD for a virtual machine, the
command would look like the following:
New-NanoServerImage -Edition Standard -DeploymentType Guest -MediaPath f:\ -BasePath .\Base -TargetPath .\Nano1\Nano.vhd -ComputerName Nano1 -Packages Microsoft-NanoServer-DSC-Package
For information about installing and using Nano Server, as well as how to manage Nano Server with PowerShell Remoting, see Getting Started with Nano Server.
Because Nano Server supports only a limited set of APIs compared to a full version of Windows Server, DSC on Nano Server does not have full functional parity with DSC running on full SKUs for the time being. DSC on Nano Server is in active development and is not yet feature complete.
The following DSC features are currently available on Nano Server:
Both push and pull modes
All DSC cmdlets that exist on a full version of Windows Server, including the following:
Compiling configurations (see DSC configurations)
Issue: Password encryption (see Securing the MOF File) during configuration compilation doesn't work.
Compiling metaconfigurations (see Configuring the Local Configuration Manager)
Running a resource under user context (see Running DSC with user credentials (RunAs))
Class-based resources (see Writing a custom DSC resource with PowerShell classes)
Debugging of DSC resources (see Debugging DSC resources)
Issue: Doesn't work if a resource is using PsDscRunAsCredential (see Running DSC with user credentials)
Pull client (configurations & resources) (see Setting up a pull client using configuration names)
MOF encryption
Event logging
Azure Automation DSC reporting
Resources that are fully functional
- Archive
- Environment
- File
- Log
- ProcessSet
- Registry
- Script
- WindowsPackageCab
- WindowsProcess
- WaitForAll (see Specifying cross-node dependencies)
- WaitForAny (see Specifying cross-node dependencies)
- WaitForSome (see Specifying cross-node dependencies)
Resources that are partially functional
Group
GroupSet
Issue: Above resources fail if specific instance is called twice (running the same configuration twice)
Service
ServiceSet
Issue: Only works for starting/stopping (status) service. Fails, if one tries to change other service attributes like startuptype, credentials, description etc.. The error thrown is similar to:
Cannot find type [management.managementobject]: verify that the assembly containing this type is loaded.
Resources that are not functional
- User
The following DSC features are not currently available on Nano Server:
- Decrypting MOF document with encrypted password(s)
- Pull Server--you cannot currently set up a pull server on Nano Server
- Anything that is not in the list of feature works
Due to a limited sets of Windows APIs and CLR libraries available on Nano Server, DSC resources that work on the full CLR version of Windows do not necessarily work on Nano Server. Complete end-to-end testing before deploying any DSC custom resources to a production environment.
DSC feedback
DSC is an open source project. Select a link to provide feedback: