mirror of
https://github.com/PowerShell/PSDscResources
synced 2026-06-21 13:45:29 +00:00
46 lines
1.2 KiB
PowerShell
46 lines
1.2 KiB
PowerShell
<#
|
|
Create a custom configuration by passing in whatever values you need.
|
|
$Name is the only parameter that is required which indicates which
|
|
Windows Feature you want to install (or uninstall if you set Ensure to Absent).
|
|
LogPath and Credential are not included here, but if you would like to specify
|
|
a custom log path or need a credential just pass in the desired values and add
|
|
LogPath = $LogPath and/or Credential = $Credential to the configuration here
|
|
#>
|
|
|
|
Configuration 'Install_Feature_Telnet_Client'
|
|
{
|
|
param
|
|
(
|
|
[System.String]
|
|
$Name = 'Telnet-Client',
|
|
|
|
[ValidateSet('Present', 'Absent')]
|
|
[System.String]
|
|
$Ensure = 'Present',
|
|
|
|
[System.Boolean]
|
|
$IncludeAllSubFeature = $false,
|
|
|
|
[System.Management.Automation.PSCredential]
|
|
[System.Management.Automation.Credential()]
|
|
$Credential,
|
|
|
|
[ValidateNotNullOrEmpty()]
|
|
[System.String]
|
|
$LogPath
|
|
)
|
|
|
|
Import-DscResource -ModuleName 'PSDscResources'
|
|
|
|
Node Localhost {
|
|
|
|
WindowsFeature WindowsFeatureTest
|
|
{
|
|
Name = $Name
|
|
Ensure = $Ensure
|
|
IncludeAllSubFeature = $IncludeAllSubFeature
|
|
}
|
|
}
|
|
}
|
|
|