Skip to content

Instantly share code, notes, and snippets.

Created April 9, 2017 09:12
What would you like to do?
Simple set spooler service in PowerShell DSC
Configuration ManagePrintServer
param (
[string[]]$NodeName = 'localhost'
Import-DscResource –ModuleName 'PSDesiredStateConfiguration'
Node $NodeName
Service StartSpooler
Name = "spooler"
State = "running"
Ensure = "Present"
ManagePrintServer -NodeName localhost -OutputPath C:\mof
Start-DscConfiguration -Path C:\mof -Verbose -wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment