Skip to content

Instantly share code, notes, and snippets.

Embed
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
You can’t perform that action at this time.