Skip to content

Instantly share code, notes, and snippets.

@Thermionix
Thermionix / mount.iso.psm1
Last active November 15, 2022 10:39
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" }
@ShaRose
ShaRose / WinPEISOCrap.ps1
Last active January 21, 2017 13:33
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