aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/scripts/azure-pipelines/windows/sysprep.ps1
blob: 2af2ae9fa103d03af58d1d44f4bf874a85c04af7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT
#

param([string]$SasToken)

<#
.SYNOPSIS
Prepares the virtual machine for imaging.

.DESCRIPTION
Runs the `sysprep` utility to prepare the system for imaging.
See https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep--system-preparation--overview
for more information.
#>

$ErrorActionPreference = 'Stop'
Write-Host 'Running sysprep'
& C:\Windows\system32\sysprep\sysprep.exe /oobe /generalize /mode:vm /shutdown