Files
PowerShell_Adv_Automation/Exercise Files/01_05/01_05.ps1
Iwan Clement 1808f43f53 first commit
2020-11-03 18:55:20 +01:00

35 lines
744 B
PowerShell
Executable File

New-Guid
Configuration ConfiguredServer
{
Param([string[]]$ComputerName = "srv02")
Import-DscResource -ModuleName PSDesiredStateConfiguration
Node $ComputerName
{
Service NoMapsDownload
{
Name = "MapsBroker"
StartupType = "Disabled"
State = "Stopped"
}
Service HaveBITS
{
Name = "BITS"
StartupType = "Automatic"
State = "Running"
}
WindowsFeature NoWebServer
{
Ensure = "Absent"
Name = "Web-Server"
}
}
}
ConfiguredServer
New-DscChecksum -Path .\ConfiguredServer\ #Place .mof filename here