Skip to content

Instantly share code, notes, and snippets.

Mathias R. Jessen IISResetMe

  • Netherlands
Block or report user

Report or block IISResetMe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View VisitorKittenz.ps1
using namespace System.Collections.Generic
using namespace System.Management.Automation.Language
#region AstVisitor
class VisitorKitten : ICustomAstVisitor
$temp = $ast
$count = 0
while($temp -and $temp -ne $temp.Parent){
View Get-DistinctUnion.ps1
function Get-DistinctUnion
$temp = [System.Collections.Generic.HashSet[object]]::new($Source)
IISResetMe / ConvertFrom-EventLogRecord.ps1
Last active Apr 26, 2019
Convert EventData fields from windows event log records to objects
View ConvertFrom-EventLogRecord.ps1
function ConvertFrom-EventLogRecord
IISResetMe / GetFileTime.ps1
Last active Apr 24, 2019
Fast acquisition of LastWriteTime attribute value of files via Kernel32.dll
View GetFileTime.ps1
$kernel32,$filetime = Add-Type -TypeDefinition @'
// Partial port of the C# example at
using System;
using System.Runtime.InteropServices;
public class Kernel32wrappers {
[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
IISResetMe / Get-ChildItemDeep.ps1
Created Apr 12, 2019
Get-ChildItem -Depth for PS 4.0
View Get-ChildItemDeep.ps1
function Get-ChildItemDeep
[Parameter(ParameterSetName='Items', Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)]
View wildcards.ps1
function Search-Stuff
$Data = 'lol', 'lol123', '123lol', '123lol123'
$Filter = if([WildcardPattern]::ContainsWildcardCharacters($string)){
{ $_ -like $string }
} else {
{ $_ -eq $string }
View CreateServicePInvoke.ps1
Add-Type '
using System;
using System.Runtime.InteropServices;
public class advapi32 {
[DllImport("advapi32.dll", SetLastError=true, CharSet=CharSet.Auto)]
public static extern IntPtr CreateService(
IntPtr hSCManager,
string lpServiceName,
string lpDisplayName,
uint dwDesiredAccess,
View Find-EncryptedFiles.ps1
$FAD,$kernel32 = Add-Type @'
using System;
using System.IO;
using System.Runtime.InteropServices;
public FileAttributes dwFileAttributes;
public System.Runtime.InteropServices.ComTypes.FILETIME ftCreationTime;
IISResetMe / Get-ArtisanalInteger.ps1
Created Mar 27, 2019
Handcrafted integers in a hurry
View Get-ArtisanalInteger.ps1
Acquires an organic, hand-crafter integer from Brooklyn Integers
An integer
View bad.ps1
$params = @{
Name = 'w*'
# unrelated stuff happening
# ...
# ...
# ...
$params2 = @{
You can’t perform that action at this time.