OSPoshMods PEPoshMods
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
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
Directories within OSPoshMods are created by default and follows this logical assignment
OSPoshMods\ProgramFiles
Content injects to OS at <Mount>\Program Files\WindowsPowerShell\Modules
OSPoshMods\System
Content injects to OS at <Mount>\Windows\System32\WindowsPowerShell\v1.0\Modules
Directories within PEPoshMods are created by default and follows this logical assignment
PEPoshMods\ProgramFiles
Content injects to WinPE at <Mount>\Program Files\WindowsPowerShell\Modules
PEPoshMods\System
Content injects to WinPE at <Mount>\Windows\System32\WindowsPowerShell\v1.0\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
C:\Program Files\WindowsPowerShell\Modules
C:\Windows\System32\WindowsPowerShell\v1.0\Modules
These are some pretty old versions installed out of the box on Windows 10 1909
Ok this looks a bit more complicated
Just some old versions of PowerShellGet and PSReadline
Nothing too out of the ordinary
Use the Save-Module cmdlet to easily add PowerShell Modules from PowerShell Gallery to the ContentPacks. Add the Verbose parameter for detailed results
Save-Module -Name OSD -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\OSPoshMods\ProgramFiles
Save-Module -Name OSD -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\PEPoshMods\ProgramFiles
Save-Module -Name PackageManagement -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\OSPoshMods\ProgramFiles
Save-Module -Name PackageManagement -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\PEPoshMods\ProgramFiles
Save-Module -Name Pester -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\OSPoshMods\ProgramFiles
Save-Module -Name PowerShellGet -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\OSPoshMods\ProgramFiles
Save-Module -Name PowerShellGet -Path D:\OSDBuilder\SeguraOSD\ContentPacks\_Global\PEPoshMods\ProgramFiles
Simple enough, it's just a file copy ...
New-OSBuild -SkipTask -Execute -SkipComponentCleanup -SkipUpdates -CreateISO