Install-UscPackage
SYNOPSIS
Installs one or more packages.
SYNTAX
Default
Install-UscPackage [-PackageId] <String> [[-VersionQuery] <VersionQuery>] [[-Arguments] <Arguments>]
[-InstanceName <String>] [-UpdateInstance] [-UpdateInstanceMode <UpdateInstanceMode>] [-RestartIfRequired]
[-RunAfterRestartScriptPath <String>] [-RunAfterRestartScriptArguments <String>]
[-UpdateStrategy <UpdateStrategy>] [-InstallWithService] [-Server <Server[]>] [-Directory <String>]
[<CommonParameters>]
Hashtable
Install-UscPackage -InputHashtable <Hashtable> [[-Arguments] <Arguments>] [-InstanceName <String>]
[-UpdateInstance] [-UpdateInstanceMode <UpdateInstanceMode>] [-RestartIfRequired]
[-RunAfterRestartScriptPath <String>] [-RunAfterRestartScriptArguments <String>]
[-UpdateStrategy <UpdateStrategy>] [-InstallWithService] [-Server <Server[]>] [-Directory <String>]
[<CommonParameters>]
File
Install-UscPackage -Path <String> [[-Arguments] <Arguments>] [-InstanceName <String>] [-UpdateInstance]
[-UpdateInstanceMode <UpdateInstanceMode>] [-RestartIfRequired] [-RunAfterRestartScriptPath <String>]
[-RunAfterRestartScriptArguments <String>] [-UpdateStrategy <UpdateStrategy>] [-InstallWithService]
[-Server <Server[]>] [-Directory <String>] [<CommonParameters>]
DESCRIPTION
Use Install-UscPackage
to install one or more packages on the local computer.
EXAMPLES
Example 1
PS C:\> Install-UscPackage -Id 'go-current-server'
This example installs the Update Service server on the local computer.
Example 2
$Arguments = @{
'package-id' = @{
ParamA = 'value'
ParamB = 'another value'
}
}
Install-UscPackage -Id 'package-id' -Arguments $Arguments
This example shows how to pass arguments to the package package-id.
Example 3
PS C:\> Install-UscPackage -Path 'c:\path\to\package-1.0.0.zip'
This example installs a package from a ZIP archive.
PARAMETERS
-Arguments
Specifies arguments for package(s).
Type: Arguments
Parameter Sets: (All)
Aliases: Parameters
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Directory
Specifies an optional alternative client directory.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-InputHashtable
Type: Hashtable
Parameter Sets: Hashtable
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-InstallWithService
The client service installs the requested package(s).
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-InstanceName
Specifies an instance name for the installation. The instance name is only applied to instance packages.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-PackageId
{{ Fill PackageId Description }}
Type: String
Parameter Sets: Default
Aliases: Package, PackageVersion, Id
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-Path
Specifies a path to a package, either a ZIP archive or a directory format, to install.
Type: String
Parameter Sets: File
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-RestartIfRequired
Restarts the local machine if installations fails and if restart pending is detected.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RunAfterRestartScriptArguments
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RunAfterRestartScriptPath
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Server
Specifies a server or list of servers.
If multiple servers are specified, the first server that contains the specified package will be used.
If omitted, servers from Servers.json are used.
Type: Server[]
Parameter Sets: (All)
Aliases: Servers
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-UpdateInstance
Allows updating existing instance.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-UpdateInstanceMode
Specifies how to update an existing instance.
Merge: Merges the specified package(s) with the packages in the existing instance. Replace: Replaces the packages in existing instance with the specified packages(s). This may result in packages being removed.
Type: UpdateInstanceMode
Parameter Sets: (All)
Aliases:
Accepted values: Merge, Replace
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-UpdateStrategy
Specifies an update strategy for the installed packages.
Automatic: Automatically updates packages. This will also install the Update Service Client Service, if not already installed. Manual It it up to the user to check for updates.
Type: UpdateStrategy
Parameter Sets: (All)
Aliases:
Accepted values: None, Automatic, Manual
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-VersionQuery
Specifies a version or a version query for the package.
Type: VersionQuery
Parameter Sets: Default
Aliases: Version
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
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
System.String
LSRetail.UpdateService.Common.SemanticVersioning.VersionQuery System.Collections.Hashtable