PackageDeployment Module Help

Package Deployment Module

Install-Assembly Cmdlet

Version 4.0.0.5

Install-Assembly

Synopsis

Installs .NET Assembly

Syntax

Install-Assembly [-SourceFile] <String> [[-TargetFile] <String>] [[-InstallerClassParameterList] <String>] [-BreakLock] [-ContinueOnError] [-CreateBackup] [-ExecuteInstallerClass] [-InstallIntoGAC] [-UninstallCurrentVersions] [[-Replace] <String>] [[-Context] <String>] [<CommonParameters>]

Description

Installs a .NET Assembly in a target directory or in the Global Assembly Cache (GAC). The respective installation file has to be selected (exe or dll). Please also specify the target directory, even if you do not want to install in the GAC.
InstallAssembly automatically determines the required .NET Framework version for the Assembly and checks whether this version exists on the managed computer during installation. The command is only executed if the required version exists!
The execution of InstallAssembly corresponds to the .NET Framework tool InstallUtil.exe.

Parameters

-BreakLock <SwitchParameter>

Break file lock, if file is locked by the server service is used in order to update files locked by the Server Service during Windows runtime without causing a reboot. This option is valid for the selected object and can be specified in the configuration table in the General Package Properties > Server Service File Lock Settings.
Please note that by using this option, the managed computer's system may crash when server applications are active!

Required

False

Position

Named

Accepts pipeline input

False

-Context <String>

User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user.
UserPerService: User-related command, execution in Service context.
Computer: Execution under user account; logging in HKEY_CURRENT_MACHINE, i.e. for the computer.
ComputerPerService: Execution in service context; logging in HKEY_LOCAL_MACHINE, i.e. for the computer.

Required

False

Position

4

Accepts pipeline input

False

-ContinueOnError <SwitchParameter>

Continues script execution in spite of errors in the respective command

Required

False

Position

Named

Accepts pipeline input

False

-CreateBackup <SwitchParameter>

Creates backup files of all files updated by a copying process.

Required

False

Position

Named

Accepts pipeline input

False

-ExecuteInstallerClass <SwitchParameter>

If you want to use specific parameters for installing the .NET Assembly, please enter the values here.

Required

False

Position

Named

Accepts pipeline input

False

-InstallerClassParameterList <String>

If you want to use specific parameters for installing the .NET Assembly, please enter the values here.

Required

False

Position

2

Accepts pipeline input

False

-InstallIntoGAC <SwitchParameter>

Select this option if you want to install the selected .NET Assembly in the GAC. No further specifications are required.

Required

False

Position

Named

Accepts pipeline input

False

-Replace <String>

Always: Files with identical names in the target directory will always be replaced.
Note: If you select the options "Always replace" or "Replace older versions only", you additionally switch to the unattended mode. In this mode, the DSM automatically checks whether the files to be installed are currently in use (and therefore cannot be installed while Windows is running). The respective files are listed; Windows is automatically restarted and the files are installed. Use the Unregister-SystemRestart command to avoid the automatic restart.
Older: This option allows you to compare file versions (of existing files). First, the Installer compares the internal versions of the files (if maintained). If the internal versions have not been maintained, the Installer compares the date and time of files having identical names. If an older file version exists it will be replaced with the newer version.
Note: If you select the options "Always replace" or "Replace older versions only", you additionally switch to the unattended mode. In this mode, the DSM automatically checks whether the files to be installed are currently in use (and therefore cannot be installed while Windows is running). The respective files are listed; Windows is automatically restarted and the files are installed. Use the Unregister-SystemRestart command to avoid the automatic restart.
Never: Files with identical names in the target directory will not be replaced.
Confirm: Files with identical names in the target directory will replaced only if the user confirms.

Required

False

Position

3

Accepts pipeline input

False

-SourceFile <String>

Source file.

Required

True

Position

0

Accepts pipeline input

False

-TargetFile <String>

Target file.

Required

False

Position

1

Accepts pipeline input

False

-UninstallCurrentVersions <SwitchParameter>

Select this additional option to uninstall existing versions of the selected .NET Assembly in the GAC; only the reinstalled version is available then.

Required

False

Position

Named

Accepts pipeline input

False

<CommonParameters>

For more information about common parameters, type "Get-Help about_CommonParameters".