New-OSBuild
Once you have created a Task using New-OSBuildTask, you can create an OSBuild.

Function

1
<#
2
.SYNOPSIS
3
Creates a new OSBuild from an OSBuild Task
4
5
.DESCRIPTION
6
Creates a new OSBuild from an OSBuild Task created with New-OSBuildTask
7
8
.LINK
9
https://www.osdeploy.com/osbuilder/docs/functions/osbuild/new-osbuild
10
11
.PARAMETER CreateISO
12
Creates an ISO of the OSBuilder Media
13
14
.PARAMETER DownloadUpdates
15
Automatically download the required updates if they are not present in the Content\Updates directory
16
17
.PARAMETER Execute
18
Execute the Build
19
20
.PARAMETER ByTaskName
21
Task Name to Execute
22
23
.PARAMETER DontUseNewestMedia
24
Use the OSMedia specified in the Task, not the Latest
25
26
.PARAMETER PromptBeforeDismount
27
Adds a 'Press Enter to Continue' prompt before the Install.wim is dismounted
28
29
.PARAMETER PromptBeforeDismountWinPE
30
Adds a 'Press Enter to Continue' prompt before the WinPE Wims are dismounted
31
#>
32
function New-OSBuild {
33
[CmdletBinding(DefaultParameterSetName='Basic')]
34
PARAM (
35
[switch]$CreateISO,
36
[switch]$DownloadUpdates,
37
[switch]$Execute,
38
[switch]$ShowMediaInfo,
39
40
[Parameter(ParameterSetName='Advanced')]
41
[string]$ByTaskName,
42
43
[Parameter(ParameterSetName='Advanced')]
44
[switch]$DontUseNewestMedia,
45
46
[Parameter(ParameterSetName='Advanced')]
47
[switch]$PromptBeforeDismount,
48
49
[Parameter(ParameterSetName='Advanced')]
50
[switch]$PromptBeforeDismountWinPE
51
)
52
}
Copied!

-DownloadUpdates

This parameter will automatically download Microsoft Updates that are needed if you have not previously downloaded them
1
New-OSBuild -DownloadUpdates
Copied!
Example: New-OSBuild -DownloadUpdates

-Execute

This parameter is required to create the OSBuild
Example: New-OSBuild -Execute

Run PowerShell CommandLine

Example: New-OSBuild -DownloadUpdates -Execute