Skip to content

Instantly share code, notes, and snippets.

@r-plus
Created July 2, 2014 09:07
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 r-plus/c17345460ece43459a03 to your computer and use it in GitHub Desktop.
Save r-plus/c17345460ece43459a03 to your computer and use it in GitHub Desktop.
Configuration ServerSetup
{
param
(
[string[]]
$Node
)
Node $Node
{
WindowsFeature Telnet
{
Name = "Telnet-Client"
Ensure = "Present"
}
Script EventLog_Application
{
SetScript = {
$log = Get-WinEvent -ListLog application
$log.MaximumSizeInBytes = 4194304 * 1024
$log.SaveChanges()
}
TestScript = {
(Get-WinEvent -ListLog application).MaximumSizeInBytes -eq (4194304 * 1024)
}
GetScript = {
@{ }
}
}
Script EventLog_Security
{
SetScript = {
$log = Get-WinEvent -ListLog security
$log.MaximumSizeInBytes = 4194304 * 1024
$log.SaveChanges()
}
TestScript = {
(Get-WinEvent -ListLog security).MaximumSizeInBytes -eq (4194304 * 1024)
}
GetScript = {
@{ }
}
}
Script EventLog_System
{
SetScript = {
$log = Get-WinEvent -ListLog System
$log.MaximumSizeInBytes = 4194304 * 1024
$log.SaveChanges()
}
TestScript = {
(Get-WinEvent -ListLog System).MaximumSizeInBytes -eq (4194304 * 1024)
}
GetScript = {
@{ }
}
}
User Guest
{
UserName = "Guest"
Disabled = $true
PasswordChangeNotAllowed = $true
PasswordNeverExpires = $true
}
User Administrator
{
UserName = "Administrator"
Disabled = $false
PasswordChangeNotAllowed = $false
PasswordNeverExpires = $false
}
# TODO: static route...
}
}
ServerSetup -OutputPath . -Node localhost
Start-DscConfiguration -Path .\ServerSetup -Wait -Verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment