Skip to main content

New-MsiTransform

SYNOPSISโ€‹

Create a transform file for an MSI database.

SYNTAXโ€‹

New-MsiTransform [-MsiPath] <String> [[-ApplyTransformPath] <String>] [[-NewTransformPath] <String>]
[-TransformProperties] <Hashtable> [[-ContinueOnError] <Boolean>] [<CommonParameters>]

DESCRIPTIONโ€‹

Create a transform file for an MSI database and create/modify properties in the Properties table.

EXAMPLESโ€‹

EXAMPLE 1โ€‹

[Hashtable]$TransformProperties = {

'ALLUSERS' = '1'
'AgreeToLicense' = 'Yes'
'REBOOT' = 'ReallySuppress'
'RebootYesNo' = 'No'
'ROOTDRIVE' = 'C:'
}

New-MsiTransform -MsiPath 'C:\Temp\PSADTInstall.msi' -TransformProperties $TransformProperties

PARAMETERSโ€‹

-MsiPathโ€‹

Specify the path to an MSI file.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplyTransformPathโ€‹

Specify the path to a transform which should be applied to the MSI database before any new properties are created or modified.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewTransformPathโ€‹

Specify the path where the new transform file with the desired properties will be created. If a transform file of the same name already exists, it will be deleted before a new one is created.

Default is: a) If -ApplyTransformPath was specified but not -NewTransformPath, then <ApplyTransformPath>.new.mst b) If only -MsiPath was specified, then <MsiPath>.mst

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TransformPropertiesโ€‹

Hashtable which contains calls to Set-MsiProperty for configuring the desired properties which should be included in new transform file.

Example Hashtable:

[Hashtable]$TransformProperties = @\{ 'ALLUSERS' = '1' \}
Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContinueOnErrorโ€‹

Continue if an error is encountered. Default is: $true.

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

CommonParametersโ€‹

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTSโ€‹

Noneโ€‹

You cannot pipe objects to this function.โ€‹

OUTPUTSโ€‹

Noneโ€‹

This function does not generate any output.โ€‹

NOTESโ€‹

https://psappdeploytoolkit.com