LogoLogo
OSDeploy.comTwitterPowerShell GalleryGitHub
  • Overview
  • OSDeploy Home
  • Module
    • Release Information
      • 2019-01
      • 2018-12
      • 2018-11
      • 2018-10
      • 2018-09
      • 2018-08
      • 2018-07
    • Functions
      • Main
        • Get-OSBuilder
          • Set Path
      • Maintenance
        • Repair-OSBuildTask
      • OSBMedia
        • New-OSBMediaISO
        • New-OSBMediaUSB
        • Show-OSBMediaINFO
      • OSBUpdate
        • Get-OSBUpdate
        • New-OSBUpdate
      • OSMedia
        • Get-OSMedia
        • Import-OSMedia
          • Batch Import-OSMedia
        • Update-OSMedia
          • Execute
      • OSBuild
        • New-OSBuildTask
          • Remove Appx Provisioned Package
          • Remove Windows Package
          • Remove Windows Capability
          • Disable Windows Optional Feature
          • Enable Windows Optional Feature
        • New-OSBuildTask (External Content)
          • Features On Demand
          • Language Packs
          • IsoExtract Content
          • Language Interface Packs
          • Language Features On Demand
          • Local Experience Packs
          • PowerShell Scripts
            • Update-OneDriveSetup
        • New-OSBuildTask (WinPE)
          • WinPE DaRT
          • WinPE Drivers
          • WinPE PowerShell Scripts
          • WinPE Extra Files
          • WinPE ADK Packages
        • New-OSBuild
      • PEBuild
        • New-PEBuildTask
          • Recovery
          • WinPE
          • MDT
        • New-PEBuild
    • PowerShell Gallery
    • GitHub
  • Docs
    • Reviews
    • Fan Requests
    • Quick Start
    • Tips
      • Task Naming
      • Verbose Logging
      • OSMedia Archive
      • OSMedia Updating
      • OSMedia Failed UBR Change
      • Windows Setup Wallpaper
    • Articles
      • Latest Latest Cumulative Update (Latest LCU)
      • Update Catalogs
      • Windows Setup with DaRT Remote Connection
      • Offline Servicing
      • Servicing Stacks
      • Work with Languages
      • DISM Cleanup Image Pending Operations
      • Win10 1607 Appx Issues
      • Updating an Updated WIM
      • OSBuilder OS Information
      • What Should I Update?
      • Windows 10 Setup and the ei.cfg
      • Automating Windows Update Downloads
      • Solutions
    • Recycle Bin
      • Instructions
        • Detailed
          • pebuild
            • scripts
              • Set-TimeZone
            • WinPE Types
              • Recovery
              • Recovery DaRT
              • Windows PE
              • MDT
            • Auto ExtraFiles
            • Drivers
              • RegAdd ActivePowerScheme
              • RegAdd AeroLite Theme
              • RegAdd Browse
              • RegAdd PowerShell ExecutionPolicy
            • ExtraFiles
              • Wallpaper
          • Update
      • OSBuilder New-OSBTemplate
      • OSBuild Templates
    • Guides
      • OSBuild Arcade
        • Frogger
      • OSBuild Templates
      • OSBuild Registry
      • Windows 7 SP1
        • Import OSMedia
        • Download Updates
        • NVMe Hotfix
        • Update OSMedia
        • ISO Testing
      • Windows 10 1809 RSAT Capability
      • registry
        • OSBuild Registry REG
          • Certificates
        • OSBuild Registry XML
    • The Basics
      • Requirements
      • Installation
      • Support
      • Get Started
      • Update OSBuilder
      • Import an OS
      • OS Information
      • Update an OS
      • Update an OS (Process)
      • Create External Media
        • Create an ISO
        • Create a USB
      • Create an OSBuild
Powered by GitBook
On this page
  • Add a Script
  • New-OSBuildTask
  • Edit an Existing New-OSBuildTask
  • Remove-OneDriveSetup.ps1
  • Add-DesktopIcons.ps1
  • New-OSBuild -Execute
  • Results
  • OSBuilder.Public Git
  • Sharing

Was this helpful?

  1. Module
  2. Functions
  3. OSBuild
  4. New-OSBuildTask (External Content)

PowerShell Scripts

PreviousLocal Experience PacksNextUpdate-OneDriveSetup

Last updated 5 years ago

Was this helpful?

There are thousands of customizations that can be added to a Windows Image, and it would be impossible for OSBuilder to contain Parameters for all of these. This is why New-OSBuild has the ability to execute PowerShell Scripts.

Add a Script

You can easily add a Script to OSBuilder by placing the PowerShell Script in the OSBuilder\Content\Scripts directory

New-OSBuildTask

Edit an Existing New-OSBuildTask

Remove-OneDriveSetup.ps1

Here is a good example of how to properly format a PowerShell Script to remove OneDrive Setup from the Registry and to delete the Shortcut

Add-DesktopIcons.ps1

This script will add This PC, Network, and Control Panel to the Desktop for all users

New-OSBuild -Execute

Results

The screenshots below should speak for themselves

OSBuilder.Public Git

These scripts are available on Github as part of my OSBuilder.Public Git

Sharing

If you find this useful, I would appreciate it if you could come up with a script for me to add!

​

Once a PowerShell Script has been added, you can create a and select the Scripts you want to include

If you know how to edit a JSON file, you can easily add a Script to an existing ​

When executing the with the Scripts in the Task, you should see the scripts executed in the PowerShell Console

New-OSBuildTask
New-OSBuildTask
New-OSBuild