| Components \ Versions | 2.0 | 3.0 | 4.0 | 5.0 | 5.1 |
|---|---|---|---|---|---|
| PowerShell | 〇 | 〇 | 〇 | 〇 | 〇 |
| PowerShell ISE | 〇 | 〇 | 〇 | 〇 | |
| PowerShell DSC | 〇 | 〇 | 〇 | ||
| WMI | 〇 | 〇 | 〇 | 〇 | |
| WinRM | 〇 | 〇 | 〇 | 〇 | 〇 |
| Management OData IIS Extensions | 〇 | 〇 | 〇 | 〇 | |
| Server Manager CIM Provider | 〇 | 〇 | 〇 | ||
| Just Enough Administration | 〇 |
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.Management.Automation; | |
| namespace MyTypeAdapter | |
| { | |
| internal class CustomProperty : | |
| PSAdaptedProperty | |
| { | |
| public CustomProperty( | |
| string name, |
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
| private static void Main() | |
| { | |
| Expression<Func<Hoge, Hoge>> expression = x => new Hoge(x.i + 9) | |
| { | |
| a = new[] { 8, 9, x.i * 2 } | |
| }; | |
| expression.Dump(); | |
| var rewrited = Bind(expression, new Hoge(10)); |
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
| void Main() | |
| { | |
| var instance = new First { | |
| Second = new Second { | |
| Third = new Third { | |
| Value = 100 | |
| } | |
| } | |
| }; | |
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
| static Func<CustomAttributeData, TAttribute> GetAttributeInstanceCreator<TAttribute>( | |
| CustomAttributeData customAttributeData) | |
| { | |
| var customAttributeDataParameter = Expression.Parameter(typeof(CustomAttributeData)); | |
| var constructorArgumentsExpression = Expression.Property( | |
| customAttributeDataParameter, | |
| nameof(CustomAttributeData.ConstructorArguments)); | |
| var listOfConstructorArgumentIndexer = (PropertyInfo)typeof(IList<CustomAttributeTypedArgument>).GetDefaultMembers()[0]; |
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
| $keys = | |
| Get-ChildItem -LiteralPath 'Registry::HKEY_CLASSES_ROOT' | | |
| Add-Member -MemberType ScriptProperty -Name 'LeafName' -Value { Split-Path -Leaf $this.PSPath } -Force -PassThru | | |
| ? { $_.LeafName.StartsWith('.') } | | |
| % { | |
| $progIds = @($_.GetValue('')) | |
| $key = Get-Item -LiteralPath (Join-Path -Path $_.PSPath -ChildPath 'OpenWithProgIds') -ErrorAction Ignore | |
| if ($key) { | |
| $progIds += @($key.GetValueNames()) |
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
| Import-Module -Name PowerShellGet | |
| Update-FormatData -AppendPath (Join-Path -Path $PSScriptRoot -ChildPath '.\InstalledModule.format.ps1xml') | |
| function Get-InstalledModule { | |
| <# | |
| .ForwardHelpTargetName PowerShellGet\Get-InstalledModule | |
| #> |
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
| Array.prototype.forEach.call(document.querySelectorAll('.webcatalog-favorite-dialog-color input[value="1"]'), (e) => e.click()) |
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
| Jenkins.instance.getItem("projectName").items.each { | |
| it.setDisabled(true) | |
| try { | |
| build = it.getLastBuild() | |
| while (build != null) { | |
| previousBuild = build.previousBuild |
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
| <Query Kind="Expression"> | |
| <NuGetReference>Newtonsoft.Json</NuGetReference> | |
| <Namespace>Newtonsoft.Json</Namespace> | |
| </Query> | |
| JsonConvert.DeserializeObject("{\"foo\": \"bar\"}") |