misc.txt 614 B

1234567891011121314151617181920212223242526272829303132333435
  1. using namespace System.Text
  2. using module CardGames
  3. function Get-PowerShellProcess { Get-Process PowerShell }
  4. Function Add-Numbers($one, $two) {
  5. $one + $two
  6. }
  7. enum MediaTypes {
  8. unknown
  9. music = 10
  10. mp3
  11. aac
  12. ogg = 15
  13. }
  14. "def" -notin "abc", "def"
  15. "Sunday" -notmatch "rain"
  16. "Good Dog" -match "Dog"
  17. 2 -eq 2
  18. "abc" -ne "def"
  19. $hash = @{
  20. SomeKey = 'SomeValue'
  21. SomeKey2 = 'SomeValue2'
  22. SomeKey3 = 'SomeValue3'
  23. }
  24. $client = New-Object System.Net.WebClient
  25. [System.Environment]::Commandline
  26. $notepad = Get-Process notepad
  27. $notepad.Kill()
  28. 'this is rocket science'.Replace('rocket', 'rock')