Skip to content

Instantly share code, notes, and snippets.

@Dedsec1
Dedsec1 / WinPEISOCrap.ps1
Created January 20, 2017 04:24 — forked from ShaRose/WinPEISOCrap.ps1
I did a powershell script!
<#
.SYNOPSIS
Install Windows from a passed ISO.
.DESCRIPTION
This command takes a path to a .iso file, mounts it, and starts setup.exe to begin windows installation.
This should only be run on Windows PE instances.
.PARAMETER ISOPath
@Dedsec1
Dedsec1 / mount.iso.psm1
Created January 20, 2017 03:40 — forked from Thermionix/mount.iso.psm1
powershell mount/unmount iso for all versions of windows
# Uses http://www.ltr-data.se/opencode.html/#ImDisk virtual disk driver for windows 7 or less
# Tries to use chocolatey to install imdisk
# Sample use case:
# Import-Module ".\mount.iso.psm1"
# Invoke-IsoExe "C:\test.iso" "setup.exe" "/passive"
function Mount-Iso([string] $isoPath)
{
if ( -not (Test-Path $isoPath)) { throw "$isoPath does not exist" }