This file contains hidden or 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
| param( | |
| [Parameter(ValueFromPipelineByPropertyName = $true, Mandatory, Position = 0)] | |
| [Alias("PSPath")] | |
| [string]$Path, | |
| [string]$OutputPath | |
| ) | |
| process |
This file contains hidden or 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> | |
| <ViewDefinitions> | |
| <View> | |
| <Name>Measure-Object-Output</Name> | |
| <ViewSelectedBy> | |
| <TypeName>Microsoft.PowerShell.Commands.GenericMeasureInfo</TypeName> | |
| </ViewSelectedBy> | |
| <ListControl> | |
| <ListEntries> | |
| <ListEntry> |
This file contains hidden or 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> | |
| <ViewDefinitions> | |
| <View> | |
| <Name>MatchInfo</Name> | |
| <ViewSelectedBy> | |
| <TypeName>Microsoft.PowerShell.Commands.MatchInfo</TypeName> | |
| </ViewSelectedBy> | |
| <CustomControl> | |
| <CustomEntries> | |
| <CustomEntry> |
This file contains hidden or 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
| using namespace System.Management.Automation.Language | |
| function AnalyzeCurlUsage | |
| { | |
| param([Parameter(ValueFromPipeline)][Alias('PSPath')][string]$path) | |
| process { | |
| $err = $null | |
| $tokens = $null |
This file contains hidden or 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
| Add-Type @" | |
| using System; | |
| using System.Runtime.InteropServices; | |
| public class NativeConsoleMethods | |
| { | |
| [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] | |
| public static extern IntPtr GetStdHandle(int handleId); |
This file contains hidden or 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
| [CmdletBinding(DefaultParameterSetName = 'FixedG')] | |
| param( | |
| [Parameter(ParameterSetName = 'FixedR', Mandatory)] | |
| [ValidateRange(0, 255)] | |
| $fixedR, | |
| [Parameter(ParameterSetName = 'FixedG')] | |
| [ValidateRange(0, 255)] | |
| [int]$fixedG = 105, |
This file contains hidden or 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
| enum Color { Red; Green; Blue } | |
| [System.Diagnostics.Tracing.EventSource(Name = "MyPSEventSource")] | |
| class C : System.Diagnostics.Tracing.EventSource | |
| { | |
| [System.Diagnostics.Tracing.Event(1)] | |
| [void] SomeRandomEvent([string]$Message, [Color]$Color) | |
| { | |
| $this.WriteEvent([int]1, [string]$Message, [int]$Color) |
This file contains hidden or 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
| using namespace System.Text.RegularExpressions | |
| param([string[]]$extensions = 'ps1') | |
| function Get-FileEncoding | |
| { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory = $True, ValueFromPipelineByPropertyName = $True)] [string]$Path | |
| ) |
This file contains hidden or 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
| using System; | |
| using System.Runtime.InteropServices; | |
| using System.Reflection; | |
| namespace App | |
| { | |
| enum E1 : byte | |
| { | |
| e1 = 5 | |
| } |
This file contains hidden or 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
| param( | |
| $etlFile = '.\perfviewdata.etl', | |
| $scenario = 'echo 1', | |
| $logFile = '.\perfview.log') | |
| $perfViewArgs = @( | |
| '/AcceptEula' | |
| '/ThreadTime' | |
| "/LogFile=$logFile" | |
| "/DataFile:$etlFile" |
OlderNewer