Created
April 20, 2017 17:48
-
-
Save ChabaOk/609f4220b93ebb50a18c3dacebb2c73c to your computer and use it in GitHub Desktop.
Demonstrate Powershell DSC for Notepad++ installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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