Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. Configuration ParametersExample
  2. {
  3. param(
  4. [Parameter(Mandatory=$true)]
  5. [string] $FeatureName,
  6.  
  7. [Parameter(Mandatory=$true)]
  8. [boolean] $IsPresent
  9. )
  10.  
  11. $EnsureString = 'Present'
  12. if($IsPresent -eq $false)
  13. {
  14. $EnsureString = 'Absent'
  15. }
  16.  
  17. Node 'sample'
  18. {
  19. WindowsFeature ($FeatureName + 'Feature')
  20. {
  21. Ensure = $EnsureString
  22. Name = $FeatureName
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement