Last active
August 29, 2015 00:47
-
-
Save duffney/0757e689506cb47dbc7b to your computer and use it in GitHub Desktop.
Config_SMTP_DSC.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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