Define DynamicKeyword 'ExecTest'
Note: Don't copy&paste from following code. PowerShell SyntaxHighlighter remove some lines. Instead, use RAW view.
#Requires -Version 4.0
Set-StrictMode -Version Latest| 0eNqV2L1u2zAYheFbCTjLAPVv6UY6FBnkmjWIMpQhyW2CwPdeOTlAh6LF+42WHlLD6+m8u1O6hesS8+bGd7fm6XrY5sNliefH71c3lqUv3Jsbh+FeuOm0zum2hcMDXmO+uHFbbqFw8ducVzd+3a+Ilzylx+E8vQQ3ujTl8/eYktvPx3wOjzvvz4XbYgqfR67zGrc4Z33x83t+53/f8A9clhZdVRZd1xbdNBbdthbddRbd9xZ9PFr0x58B6LK0tJSmMcVpTXGaU5z2FKdBxWlRcZpUnDYVp1GryhJVmkYVp1HFaVRxGlWcRhWnUcVpVHEaVZxGrWtLVGkaVZxGFadRxWlUcRpVnEYVp1HFaVRxGrVpLFGlaVRxGlWcRhWnUcVpVHEaVZxGFadRxWnUtrVElaZRxWlUcRpVnEYVp1HFaVRxGlWcRhWnUbvOElWaRhWnUcVpVHEaVZxGFadRxWlUcRpVnEbte0tUaRpVnEYVp1HFaVRxGlWcRhWnUcVpVHEa9Xi0RJWmUcVpVHEaVZxGFadRxWlUcRpVnEYVp1GHwRJVmkYVp1HFaVRxGlWcRhWnUcVpVHEaVZyPD962Pnjj/OCN+4M3DhDeuEB44wThjRuEN44Q3rhC/G9bei5c3MLL/uzPYFns708h7c++TOlHzJenOT/9mraw7K9+hmX9uLztqqEZhrbp68rX7f3+G7OWnks= |
| using namespace System.Collections.Generic | |
| function Find-CommandDelta { | |
| param( | |
| $ModulePath = 'C:\git\dbatools', | |
| $Uri = 'C:\git\web\commands\index.html', | |
| $Exclude = @('Where-DbaObject') | |
| ) | |
| end { | |
| $path = 'D:\Games\Blizzard\World of Warcraft\_classic_\Interface\AddOns\ISBoxer\ISBoxer.toc' | |
| $data = Get-Content $path | |
| $properties = @{} | |
| $pattern = '## (?<propertyName>[^:]*): (?<propertyValue>.*)' | |
| foreach($line in $data) | |
| { |
| { | |
| "template": "*", | |
| "order": 0, | |
| "mappings": { | |
| "doc": { | |
| "dynamic_templates": [ | |
| { | |
| "strings_as_keywords": { | |
| "match_mapping_type": "string", | |
| "mapping": { |
| function Get-AllCaps | |
| { | |
| param( | |
| [char[]]$InputObject | |
| ) | |
| If($InputObject.count -eq 1) | |
| { | |
| Write-Output $InputObject[0].ToString().ToUpper() | |
| Write-Output $InputObject[0].ToString().ToLower() |
http://web.archive.org/web/20090918202746/http://tothink.com/mnemonic/wordlist.html
| function Get-Double ($number){$number + $number} | |
| function Get-Double2 | |
| { | |
| <# | |
| .SYNOPSIS | |
| .EXAMPLE | |
| New-Function -ComputerName server | |
| .EXAMPLE |
| <# | |
| .SYNOPSIS | |
| Used to replace text in a file. | |
| .EXAMPLE | |
| Get-ChildItem -Recurse | Set-String -Pattern "c:\documents" -ReplaceWith "c:\users" | |
| .EXAMPLE | |
| Set-String -Pattern "c:\documents" -ReplaceWith "c:\users" -Path c:\temp\script.ps1 | |
| #> | |
| Function Set-String | |
| { |
| function Get-ChessResult | |
| { | |
| [CmdletBinding()] | |
| Param( | |
| [Parameter( | |
| Position = 0, | |
| Mandatory = $true, | |
| ValueFromPipeline = $true, | |
| ValueFromPipelineByPropertyName = $true |