Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Created August 3, 2016 17:51
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 guitarrapc/c6dad2855b0efb16813b3d5c79c21e67 to your computer and use it in GitHub Desktop.
Save guitarrapc/c6dad2855b0efb16813b3d5c79c21e67 to your computer and use it in GitHub Desktop.
configuration FeatureNetCore
{
Import-DscResource -ModuleName PSDesiredStateConfiguration;
Node localhost
{
File DestinationFolder
{
Ensure = "Present"
DestinationPath = $Node.Destination
Type = 'Directory'
Force = $true
PsDscRunAsCredential = [PSCredential]::New("USERNAME", ("SUPERNICEPASSWORD" | ConvertTo-SecureString -AsPlainText -Force))
}
}
}
configuration xScriptTest
{
Import-DscResource -ModuleName xPSDesiredStateConfiguration;
Node localhost
{
xScript Test
{
GetScript = {@{}}
SetScript = {}
TestScript = {return $true}
PsDscRunAsCredential = [PSCredential]::New("USERNAME", ("SUPERNICEPASSWORD" | ConvertTo-SecureString -AsPlainText -Force))
}
}
}
configuration Nest
{
FeatureNetCore FeatureNetCore {}
xScriptTest xScriptTest {}
}
$data = @{
AllNodes = @(
@{
NodeName = "localhost"
PsDscAllowPlainTextPassword = $true
}
)
}
Nest -ConfigurationData $data
cat .\Nest\localhost.mof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment