LogoLogo
OSDeploy.comTwitterGitHubPowerShell Gallery
  • Overview
  • Release Notes
    • 2019 Archive
  • OSDeploy Home
  • Module
    • Functions
      • Get-DownOSDBuilder
      • Get-OSBuilds
      • Get-OSDBuilder
      • Get-OSMedia
      • Get-PEBuilds
      • Import-OSMedia
      • Initialize-OSDBuilder
      • New-OSBuild
      • New-OSBuildMultiLang
      • New-OSBuildTask
      • New-OSDBuilderContentPack
      • New-OSDBuilderISO
      • New-OSDBuilderUSB
      • New-OSDBuilderVHD
      • New-OSDBuildPack
      • New-PEBuild
      • New-PEBuildTask
      • Show-OSDBuilderInfo
      • Update-OSMedia
    • GitHub
    • PowerShell Gallery
  • Docs
    • Basics
      • Requirements
      • Installation
      • Get-OSDBuilder
        • Get-OSDBuilder -Update
    • OSImport
      • Import-OSMedia
      • Import-OSMedia Automation
      • Import-OSMedia -Update
      • Import-OSMedia -BuildNetFX
      • Download FeatureUpdates
    • OSMedia
      • Get-OSMedia
      • Download OSMediaUpdates
      • Download OneDrive
      • Update-OSMedia
        • Updates Parameter
        • SkipComponentCleanup Parameter
    • Download Updates
    • Media Functions
      • OS Information
      • Create an ISO
      • Create a USB
      • Create a VHD
    • ContentPacks
      • Content
        • Media
        • OSCapability
        • OSDrivers PEDrivers
        • OSExtraFiles PEExtraFiles
        • OSPackages
        • OSPoshMods PEPoshMods
        • OSRegistry PERegistry
        • OSScripts PEScripts
        • OSStartLayout
        • PEADK
        • PEDaRT
      • MultiLang Content
        • OSLanguagePacks
        • OSLanguageFeatures
        • OSLocalExperiencePacks
        • PEADKLang
      • New-OSBuildTask
      • New-OSBuild
      • Recipes
        • MultiLang FOD NetFX3
        • Multilang FOD RSAT
        • Frogger
    • OSBuild
      • New-OSBuildTask
        • Basic Parameters
          • CustomName
          • EnableNetFX3
          • EnableFeature
          • DisableFeature
          • RemoveAppx
          • RemoveCapability
          • RemovePackage
          • WinPEAutoExtraFiles
        • Content Parameters
          • ContentDrivers
          • ContentExtraFiles
          • ContentPackages
          • ContentScripts
          • ContentStartLayout
          • ContentUnattend
        • WinPE Content Parameters
          • ContentWinPEADK
          • ContentWinPEDaRT
          • ContentWinPEDrivers
          • ContentWinPEExtraFiles
          • ContentWinPEScripts
        • Manual Editing
        • SaveAs
        • Templates
        • Language Parameters
      • New-OSBuild
        • OSBuild Validate
        • OSBuild Download
        • OSBuild Execute
      • Content Directory
        • ADK
        • DaRT
        • Drivers
          • Intel Wireless
          • Intel Bluetooth
          • Intel Ethernet
        • ExtraFiles
        • IsoExtract
        • Mount (Managed)
        • OneDrive
        • OSDUpdate (Managed)
        • Packages
        • Scripts
        • StartLayout
        • Unattend
          • Windows System Image Manager
    • Advanced
      • Settings
        • Redirecting Paths
        • Disable Global Settings
        • Citrix PVS Target Device
        • Automatic Downloads
        • Import-OSMedia
        • Update-OSMedia
      • OSMedia Baseline
      • MultiLang Baseline
        • Clean Start
        • Add Primary Operating System
        • ContentPack Configuration
        • New-OSBuild
        • New-OSBuild PE
    • Legacy Operating Systems
      • Windows 7 SP1
        • Build and Capture
      • Windows Server 2012 R2
    • Windows MultiLang
      • Requirements
      • OSMedia
      • OSBuild Task
      • OSBuild Task WinPE
      • OSBuild
      • OSBuild Test
      • OSBuild MultiLang
      • OSBuild MultiLang Test
    • Support
      • Review the Logs
  • External Links
    • Addons
      • OSDBuilder Import Tool (Andrew Jimenez)
    • WebCast
      • Offline WaaS Servicing (Modern Deployment)
    • Training
      • Arthur
      • DeploymentMX (2018)
      • Brian Gonzales
      • Ben Whitmore
      • Manel Rodero
      • DeploymentMX (2019)
Powered by GitBook
On this page
  • ContentPack Structure
  • Installed Modules
  • OS Program Files
  • OS System32
  • WinSE Program Files
  • WinSE System32
  • Save-Module
  • Build

Was this helpful?

  1. Docs
  2. ContentPacks
  3. Content

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

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

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

C:\Program Files\WindowsPowerShell\Modules
C:\Windows\System32\WindowsPowerShell\v1.0\Modules

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

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

Build

Simple enough, it's just a file copy ...

New-OSBuild -SkipTask -Execute -SkipComponentCleanup -SkipUpdates -CreateISO
PreviousOSPackagesNextOSRegistry PERegistry

Last updated 5 years ago

Was this helpful?