Skip to content

Instantly share code, notes, and snippets.

@HotCakeX
HotCakeX / gist:a8127ef1f7fa4254a96be56177af2d49
Last active July 3, 2024 11:48
Block bad script hosts
<?xml version="1.0" encoding="utf-8"?>
<SiPolicy xmlns="urn:schemas-microsoft-com:sipolicy" PolicyType="Base Policy">
<VersionEx>1.0.0.0</VersionEx>
<PlatformID>{2E07F7E4-194C-4D20-B7C9-6F44A6C5A234}</PlatformID>
<Rules>
<Rule>
<Option>Enabled:UMCI</Option>
</Rule>
<Rule>
<Option>Enabled:Inherit Default Policy</Option>
@HotCakeX
HotCakeX / Get-EdgeDriverSelenium.ps1
Created November 10, 2023 07:59
How to Install Edge WebDriver and Use Selenium With It
[System.String]$RegistryPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\msedge.exe'
[System.String]$SeleniumDirectory = 'C:\EdgeSelenium'
# Check to see if Microsoft Edge is installed
if (-not (Test-Path -Path $RegistryPath)) {
# Write an error if Edge was not found
Write-Error -Message 'Microsoft Edge needs to be installed!'
# Exit the script and set a return code
exit 1
@HotCakeX
HotCakeX / Windows ReFS versions.en.md
Created January 25, 2023 23:27 — 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.