Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. Configuration MyWebConfig
  2. {
  3. Param($ComputerName)
  4.  
  5. Node $ComputerName {
  6. WindowsFeature MyRoleExample
  7. {
  8. Ensure = "Present"
  9. Name = "Web-Server"
  10. }
  11. }
  12. }
  13.  
  14. C:Scripts> $PSVersionTable
  15.  
  16. Name Value
  17. ---- -----
  18. PSVersion 4.0
  19. WSManStackVersion 3.0
  20. SerializationVersion 1.1.0.1
  21. CLRVersion 4.0.30319.34003
  22. BuildVersion 6.3.9600.16394
  23. PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
  24. PSRemotingProtocolVersion 2.2
  25.  
  26. # dot source will load PS1 into current session
  27. . .IisWithCompressionConfig.ps1
  28. # Then call the config
  29. MyWebConfig -ComputerName "localhost"
  30.  
  31. Get-ChildItem Function:* | Where-Object { $_.CommandType -eq 'Configuration' }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement