OSPoshMods PEPoshMods
For starters, PoshMods = PowerShell Modules ... so yes, you can easily add PowerShell Modules to WinPE and your OS using these ContentPacks. Since you should have added PowerShell using PEADK, why not update some Modules while you are at it

ContentPack Structure

Directories within OSPoshMods are created by default and follows this logical assignment
1
OSPoshMods\ProgramFiles
2
Content injects to OS at <Mount>\Program Files\WindowsPowerShell\Modules
3
OSPoshMods\System
4
Content injects to OS at <Mount>\Windows\System32\WindowsPowerShell\v1.0\Modules
Copied!
Directories within PEPoshMods are created by default and follows this logical assignment
1
PEPoshMods\ProgramFiles
2
Content injects to WinPE at <Mount>\Program Files\WindowsPowerShell\Modules
3
PEPoshMods\System
4
Content injects to WinPE at <Mount>\Windows\System32\WindowsPowerShell\v1.0\Modules
Copied!

Installed Modules

Let's first see what we have installed in Windows. You should have two PowerShell Modules directories that are used by default ... so let's see what is in them
1
C:\Program Files\WindowsPowerShell\Modules
2
C:\Windows\System32\WindowsPowerShell\v1.0\Modules
Copied!

OS Program Files

These are some pretty old versions installed out of the box on Windows 10 1909

OS System32

Ok this looks a bit more complicated

WinSE Program Files

Just some old versions of PowerShellGet and PSReadline

WinSE System32

Nothing too out of the ordinary

Save-Module

Use the Save-Module cmdlet to easily add PowerShell Modules from PowerShell Gallery to the ContentPacks. Add the Verbose parameter for detailed results
1
Save-Module -Name OSD -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\OSPoshMods\ProgramFiles
2
Save-Module -Name OSD -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\PEPoshMods\ProgramFiles
3
Save-Module -Name PackageManagement -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\OSPoshMods\ProgramFiles
4
Save-Module -Name PackageManagement -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\PEPoshMods\ProgramFiles
5
Save-Module -Name Pester -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\OSPoshMods\ProgramFiles
6
Save-Module -Name PowerShellGet -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\OSPoshMods\ProgramFiles
7
Save-Module -Name PowerShellGet -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\PEPoshMods\ProgramFiles
Copied!

Build

Simple enough, it's just a file copy ...
1
New-OSBuild -SkipTask -Execute -SkipComponentCleanup -SkipUpdates -CreateISO
Copied!
Last modified 2yr ago