Publish-SCWindowsPE

Publishes an updated Windows PE image for use by all PXE servers in your VMM environment.

Syntax

Publish-SCWindowsPE
       [-VMMServer <ServerConnection>]
       [-RunAsynchronously]
       -Path <String>
       [-ISOPath <String>]
       [-IsUEFI]
       [<CommonParameters>]
Publish-SCWindowsPE
       [-VMMServer <ServerConnection>]
       [-RunAsynchronously]
       [-UseDefaultImage]
       [-ISOPath <String>]
       [-IsUEFI]
       [<CommonParameters>]

Description

The Publish-SCWindowsPE cmdlet publishes an updated Windows Preinstallation Environment (Winows PE) image for use by all Pre-Boot EXecution Environment (PXE) servers in your Virtual Machine Manager (VMM) environment.

Note: This cmdlet must be run on the VMM management server.

Scenarios that require an updated Windows PE image:

  • The Windows Automated Installation Kit (AIK) is patched, or Microsoft issues a new version of Windows AIK.
  • The VMM agent binaries are patched.
  • You add your own drivers, or other custom files, to Windows PE.

Note: Customize the Windows PE image by adding drivers or custom files using standard Windows tools and then use this cmdlet to publish the updated Windows PE boot WIM image on a library share.

Each scenario requires that you use this cmdlet not only to add the updated Windows PE image to VMM but also to rebuild it.

Tasks that you perform by using this cmdlet include the following:

1. Specify the source Windows PE image:

Option 1: Start from the standard Windows PE image from the Windows AIK that is currently installed on the VMM management server. In this case, both x86 and x64 versions of Winows PE must be processed.

Option 2: Start from an existing Windows PE image on a VMM library share. In this case, only the specified Windows PE image (which is either x86 or x64) is processed.

Note: The Windows PE image chosen must not already contain the VMM agent. If such a Windows PE image is chosen, an error is returned and the Windows PE image is not imported.

2. Specify the Library Resource Folder in which to store the updated Windows PE image.

Note: VMM creates a folder named Boot WIMS with Agent on the target Library Resource Folder if it does not already exist.

3. Construct a new Windows PE image from the source Winows PE image as follows:

a. Copy the source Windows PE image into a temporary location on the VMM management server.

b. Mount the WinPE image.

c. Copy the agent files from the fixed location on the VMM management server into a fixed location in the Windows PE image. Overwrite any files that already exist in the Windows PE image, but do not otherwise delete any files or directories.

d. Perform Windows PE configuration tasks, such as setting the RAM disk size, ensuring that optional features like WMI are installed, and so on.

e. Unmount the image and commit changes.

f. Copy the updated Winows PE image into the Boot WIMs with Agent folder.

4. Force discovery on the Library Resource Folder, and confirm that the newly placed Windows PE image appears in your VMM environment.

5. Use Publish-SCWindowsPE to copy all Windows PE images in the Boot WIMs with Agent folder to all PXE servers, and to extract Windows network boot programs (NBP) on each PXE server.

Examples

Example 1: Update the Windows PE image with a custom Windows PE image base

PS C:\> Publish-SCWindowsPE -Path "\\LibraryServer02\VMMWinPE\ContosoIT.wim"

This command uses a customized base image to create a Windows PE image and updates all VMM PXE servers.

Example 2: Re-create the Windows PE image and update the VMM PXE servers

PS C:\> Publish-SCWindowsPE -UseDefaultImage

This command re-creates the Windows PE image by using the Windows PE image from (or updated by) the Windows ADK. It then updates all VMM PXE servers.

Parameters

-ISOPath

Specifies the destination path for an ISO file.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IsUEFI

Indicates that the computer on which the operating system will be installed is Unified Extensible Firmware Interface (UEFI)-based.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Path

Specifies the destination path for the operation.

Example formats:

  • Local path: -Path "F:\"
  • UNC path: -Path "\\Library\Templates"
  • Volume GUID path: -Path "\\?\Volume{4703c1ea-8ae7-11db-b473-00123f7603e3}\"
  • VMware ESX path: -Path "\[storage1\]\MyVMwareFolderForVMs\MyVM.vmx"
  • Citrix XenServer path: -Path "Local storage\[99b6212f-b63d-c676-25f9-d6c460992de7\]"
Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UseDefaultImage

Indicates that new or updated Windows Preinstallation Environment (Windows PE) images are published by using the standard Windows PE images from the latest Windows Automated Deployment Kit (Windows ADK).

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False