Skip to content

Instantly share code, notes, and snippets.

@signalwarrant
Created March 9, 2021 19:07
Show Gist options
  • Save signalwarrant/86a80202b97138f21049f00918a21a51 to your computer and use it in GitHub Desktop.
Save signalwarrant/86a80202b97138f21049f00918a21a51 to your computer and use it in GitHub Desktop.
ExchangeSVCmof.ps1
# Your Configuration
Configuration ExchangeService {
# Parameters
# Accepts a string value computername or defaults to localhost
Param([string[]]$ComputerName = "localhost")
# Target Node
Node $ComputerName {
# Service Resource
# Ensure a service is started
Service MSExchangeTransport {
Name = 'MSExchangeTransport'
State = 'Running'
}
}
}
# Generate the .MOF files
ExchangeService -Computername EXCH
# Create a Checksum for the file listed above
New-DscChecksum ".\exchangeservice\exch.mof"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment