Skip to content

Instantly share code, notes, and snippets.

View Pester_FailedTest_StackTrace.Tests.ps1
Import-Module Pester -MinimumVersion 4.0
Describe "テスト失敗時のスタックトレース表示確認"{
Context "通常実行"{
It "テスト01(日本語カルチャ)"{
# UIロケールが日本語となっていることを確認
[System.Threading.Thread]::CurrentThread.CurrentUICulture | Should -Be ([cultureInfo]::GetCultureInfo('ja-jp'))
# テスト失敗時の表示確認
$true | Should -Be $false
altrive /
Last active Jan 13, 2018
How to check TLS version by MessageAnalyzer

Office 365 stop supporting TLS 1.0/1.1 at March 1st 2018.
It may required to applying windows patch and registry settings (for application targetting .NET 4.6 or prior version)

Then, it need to ensure old protocols are not used.

Confirm TLS version by Message Analyzer

Use following filter to show only SSL/TLS ClientHello traffics.

(SSL) or (TLS.records[0].fragment[0].msg_type == TLS.HandshakeType.client_hello)
altrive /
Last active Oct 28, 2017
Using Allure for .NET project


Allure は複数言語に対応したテストレポート作成ツールです。


  • 公式サイト ()
altrive / InstallDnSpy.ps1
Created Oct 9, 2017
dnSpy installation script by using scoop
View InstallDnSpy.ps1
#Define scoop app manifest
$manifest = [ordered] @{
homepage = ''
version = '4.0.0'
# TODO: Use latest build from <>
url = ''
hash = '25da2e9dc426a78b75235906a166b597054f8ae1247c212520023e13b5474f62'
bin = @(
View LinqPad_Dump_by_Reflection.cs
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
View NLog.StructuredLogging
<Query Kind="Program">
<NuGetReference Version="4.5.0-alpha01" Prerelease="true">NLog</NuGetReference>
void Main()
altrive / Get-EtwTraceProvider.ps1
Created Jan 6, 2016
GetTraceProviderList sample
View Get-EtwTraceProvider.ps1
#Get-EtwTraceProvider Cmdlet don't return ProviderName
#and some providers returns invalid guid? (invalid parentheses pair)
# Error at: {E02A841C-75A3-4FA7-AFC8-AE09CF9B7F23)
Get-EtwTraceProvider | foreach{ $_.guid;[Guid]::Parse($_.guid)}
altrive /
Last active Nov 12, 2019
My PowerShell Connect Site WatchList


Add equivalent of c# using statement to powershell (Vote:3)

ISE hangs after using a Windows Forms dialog (Vote:7)

altrive / Test-Remotely.ps1
Created May 9, 2015
Remotely PowerShell Module Tests
View Test-Remotely.ps1
function Test-Message
Write-Verbose "Test Message" -Verbose
Describe "Test-Remotely"{
It "Send local function to remote session"{
#Arrange: Send local function definition to remote session
Remotely ([ScriptBlock]::Create(${Function:Test-Message}.Ast.Extent.Text))