Skip to content

Instantly share code, notes, and snippets.

@ChabaOk
Created April 20, 2017 17:48
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 ChabaOk/609f4220b93ebb50a18c3dacebb2c73c to your computer and use it in GitHub Desktop.
Save ChabaOk/609f4220b93ebb50a18c3dacebb2c73c to your computer and use it in GitHub Desktop.
Demonstrate Powershell DSC for Notepad++ installation
configuration PackageTest{
param(
[Parameter(Mandatory)] $Machine
)
Import-DscResource –ModuleName 'PSDesiredStateConfiguration'
node $Machine
{
Package PackageExample
{
Ensure = "Present" # You can also set Ensure to "Absent"
Path = "c:\source\npp.7.3.3.Installer.x64.exe"
Name = "Notepad++ (64-bit x64)"
ProductID = ""
Arguments = "/S"
}
}
}
PackageTest -Machine localhost -outputpath c:\work\mof\NotePadplus
Test-DscConfiguration -Path c:\work\mof\NotePadplus -Verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment