Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Created August 3, 2016 17:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save guitarrapc/4d6d42f1c5fec2e1da33725e56ea90cb to your computer and use it in GitHub Desktop.
configuration FeatureNetCore
{
Import-DscResource -ModuleName PSDesiredStateConfiguration;
Node localhost
{
WindowsFeature NET-Framework-Core
{
Ensure = "Present"
Name = "NET-Framework-Core"
IncludeAllSubFeature = $false
LogPath = "C:\Logs\DSC\WindowsFeature\NET-Framework-Core.txt"
PsDscRunAsCredential = [PSCredential]::New("USERNAME", ("SUPERNICEPASSWORD" | ConvertTo-SecureString -AsPlainText -Force))
}
}
}
$data = @{
AllNodes = @(
@{
NodeName = "localhost"
PsDscAllowPlainTextPassword = $true
}
)
}
FeatureNetCore -ConfigurationData $data
cat .\FeatureNetCore\localhost.mof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment