Skip to content

Instantly share code, notes, and snippets.

@duffney
Last active August 29, 2015 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duffney/0757e689506cb47dbc7b to your computer and use it in GitHub Desktop.
Save duffney/0757e689506cb47dbc7b to your computer and use it in GitHub Desktop.
Config_SMTP_DSC.ps1
configuration SMTP {
Node HTTPComputers {
WindowsFeature SMTP{
Name = 'SMTP-Server'
Ensure = 'Present'
}
}
}
SMTP -OutputPath C:\DSC\HTTP
$guid=Get-DscLocalConfigurationManager -CimSession DC02 | Select-Object -ExpandProperty ConfigurationID
# Specify source folder of configuration
$source = "C:\DSC\HTTP\HTTPComputers.mof"
# Destination is the Share on the SMB pull server
$dest = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration\$guid.mof"
Copy-Item -Path $source -Destination $dest
#Then on Pull server make checksum
New-DSCChecksum $dest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment