Skip to content

Instantly share code, notes, and snippets.

@XenoPanther
XenoPanther / Windows ReFS versions.en.md
Last active October 21, 2025 14:09 — forked from 0xbadfca11/00_README.md
Windows ReFS versions

Version number is reported by fsutil fsinfo refsinfo, available on Windows 10 and Windows Server 2016.

ReFS 1.1

  • Version of formatted by Windows Server 2012.
  • Version 1.1 is used already in Windows Server 8 Beta. I have never seen version 1.0.
  • Can use and store alternate data streams, when mount on 8.1/2012 R2 or later.

ReFS 1.2

  • Version of formatted by Windows 8.1, Windows 10 v1507 to v1607, Windows Server 2012 R2, and when specified ReFSv1 on Windows Server 2016 or later.
  • Cannot use alternate data streams, when mount on 2012.
@kapsiR
kapsiR / Update-DotNet-Global-Tools.ps1
Created September 28, 2022 06:32
Update all dotnet global tools at once
function Update-DotNet-Global-Tools
{
foreach ($toolInfoRow in $(dotnet tool list -g | Select-Object -Skip 2))
{
$toolInfo = $toolInfoRow.Split(" ", [StringSplitOptions]::RemoveEmptyEntries)
$toolName = $toolInfo[0]
$toolVersion = $toolInfo[1].Trim()
# Fetch version from NuGet
$nugetInfo = (dotnet tool search --take 1 $toolName | Select-Object -Skip 2)
@crypt0ace
crypt0ace / demo_process_injection.cs
Created September 2, 2022 06:24
Process Injection
using System;
using System.Linq;
using System.Runtime.InteropServices;
using static ShellcodeInjection.Imports;
namespace ShellcodeInjection
{
class Program
{
@maxkagamine
maxkagamine / Known folder.reg
Last active July 31, 2025 09:19
Recycle Bin can be enabled on a mapped network drive by defining a Known Folder in the registry. (Also a way to create custom user folders. For adding folders to This PC, though, it seems you need to create a CLSID entry instead; use Winaero Tweaker for that.)
Windows Registry Editor Version 5.00
; For folder icons, set folder to read-only and create a desktop.ini set to
; read-only|system|hidden with contents:
; [.ShellClassInfo]
; IconResource=C:\Path\To\Icon.ico,0
; Remember to change the guid for each known folder:
; https://www.guidgenerator.com/
<PropertyGroup Label="Output directory">
<BinariesFolder>$(SrcRoot)bin</BinariesFolder>
<CommonIntermediateOutputRoot>$(SrcRoot)obj\</CommonIntermediateOutputRoot>
<BaseIntermediateOutputPath>$(CommonIntermediateOutputRoot)$(Configuration)\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath>
<AssemblyInfoPath Condition="'$(AssemblyInfoPath)' == ''">$(BaseIntermediateOutputPath)GlobalAssemblyInfo.cs</AssemblyInfoPath>
<CommonOutputDirectory>$(BinariesFolder)\$(Configuration)</CommonOutputDirectory>
<BuildToCommonOutputDirectory Condition="'$(BuildToCommonOutputDirectory)' == ''">true</BuildToCommonOutputDirectory>
<OutputPath Condition="'$(OutputPath)' == ''">$(BinariesFolder)\$(Configuration)\$(MSBuildProjectName)</OutputPath>
<OutputPath Condition="'$(BuildToCommonOutputDirectory)' == 'true'">$(CommonOutputDirectory)\</OutputPath>
@Braytiner
Braytiner / Windows Defender Exclusions VS 2022.ps1
Last active October 6, 2025 18:37
Adds Windows Defender exclusions for Visual Studio 2022
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\Downloads\HeidiSQL_11.3_64_Portable') > $null
$pathExclusions.Add($userPath + '\.dotnet') > $null
@wgross
wgross / get-registry-property-value.ps1
Created September 22, 2021 08:46
Fetches Key name, property name and property value from registry keys
Get-ChildItem . | Foreach-Object {
# this is done foreach reg key
$regKey = $_;
# property is a list of properties of the registry key
$_.Property | ForEach-Object -Process {
[PScustomobject]@{
Key =$regKey.Name
Property=$_
# Value is returned as a complex object extsnded with sevaral PS properties.
@ii64
ii64 / poc.ps1
Last active July 31, 2025 22:03
Enable Explorer Recycle Bin for Netowrk/Shared Folder
# Source: https://social.technet.microsoft.com/forums/windows/en-US/a349801f-398f-4139-8e8b-b0a92f599e2b/enable-recycle-bin-on-mapped-network-drives
# New-Item -Name "test" -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions"
$targGUID = "{" + [guid]::NewGUID().ToString().ToUpper() + "}"
echo "**Using GUID: $targGUID"
echo "** FOLDER DESCRIPTIONS"
$kPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions"
New-Item -Path $kPath -Type REG_SZ -Name $targGUID -Force
@davidfowl
davidfowl / ModuleLoader.cs
Last active March 5, 2023 19:21
ModuleLoader: This handles concurrent requests adding modules and duplicates
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Runtime.Loader;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.ApplicationParts;
using Microsoft.AspNetCore.Mvc.Infrastructure;
@mterhorst
mterhorst / ALC.Sandbox.csproj
Created January 18, 2021 08:48
Exception in debug mode after ALC unload.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" />
</ItemGroup>