Private/Get-IcdArgs.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function Get-IcdArgs {
    [CmdletBinding()]
    [OutputType([Array])]
    param (
        [string] $IcdPath,
        [string] $XmlPath,
        [string] $PackagePath,
        [bool] $Overwrite
    )

    $storePath = Join-Path -Path (Split-Path -Parent -Path $IcdPath) -ChildPath 'Microsoft-Desktop-Provisioning.dat'
    $overwriteSymbol = if ($Overwrite) { '+' } else { '-' }
    @(
        '/Build-ProvisioningPackage'
        "/CustomizationXML:`"$XmlPath`""
        "/PackagePath:`"$PackagePath`""
        "/StoreFile:`"$storePath`""
        "$($overwriteSymbol)Overwrite"
    )
}