Skip to content

Instantly share code, notes, and snippets.

View oldmate45's full-sized avatar

Oldmate45 oldmate45

  • Aus
  • 22:37 (UTC +10:00)
View GitHub Profile
@oldmate45
oldmate45 / ei.cfg
Created January 11, 2025 13:54 — forked from sebastiandg7/ei.cfg
Config file to place in sources/ei.cfg inside Windows Installation USB to avoid automatic Windows version detection
[EditionID]
Professional
[Channel]
Retail
@oldmate45
oldmate45 / Restore-Ownership.ps1
Created November 22, 2023 04:30 — forked from joshooaj/Restore-Ownership.ps1
Take ownership of files/folders and restore permissions
function Restore-Ownership {
<#
.SYNOPSIS
Restores file/folder ownership for the current user or the Administrators group.
.DESCRIPTION
The `Restore-Ownership` cmdlet restores ownership of files and/or folders
for the current Windows user (default), or the BUILTIN\Administrators group.
This is accomplished using `takeown.exe` to take ownership of the file or
folder, followed by `Set-Acl` to add a `System.Security.AccessControl.FileSystemAccessRule`