< Back

Add-MSISource

Sat Jan 18, 2020 4:43 pm

NAME Add-MSISource



SYNOPSIS

Adds a registered network source or URL from a product or patch.





SYNTAX

Add-MSISource [-ProductCode] <String> -LiteralPath <String[]> [-Force] [-PassThru] [-PatchCode <String>]

[-UserContext <UserContexts>] [-UserSid <String>] [<CommonParameters>]



Add-MSISource [-ProductCode] <String> [-Path] <String[]> [-Force] [-PassThru] [-PatchCode <String>] [-UserContext

<UserContexts>] [-UserSid <String>] [<CommonParameters>]





DESCRIPTION

Windows Installer products and patches can have zero or more registered locations that direct Windows Installer

where to look for package source. This cmdlet will add a network source or URL to a product or patch and

optionally return the remaining registered source locations through the pipeline.





PARAMETERS

-LiteralPath <String[]>

The directory or URL to register. The value of -LiteralPath is used exactly as typed. No characters are

interpreted as wildcards.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Force [<SwitchParameter>]

Whether to validate that directories exist before they are added to the source list.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

Whether to return the remaining registered source through the pipeline.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-PatchCode <String>

The patch code for a patch.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Path <String[]>

The directory or URL to register. Wildcards are permitted. You can specify * in any part of the path to select

all matching files.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? true



-ProductCode <String>

The ProductCode for a product or applied patch.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-UserContext <UserContexts>

The user context for a product or patch.



Required? false

Position? named

Default value All

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-UserSid <String>

The user SID for a product or patch.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Microsoft.Tools.WindowsInstaller.SourceInfo





Microsoft.Tools.WindowsInstaller.PatchSourceInfo







NOTES









-------------------------- EXAMPLE 1 --------------------------



add-msisource '{707ABAE4-4DC5-478C-9D36-7CC5C1A85A3C}' 'C:\\Package Cache\\'



Adds the C:\\Package Cache source location from the specified product.



RELATED LINKS

Clear-MSISource

Get-MSISource

Remove-MSISource