Install-LabSoftwarePackage
SYNOPSIS
Install software
SYNTAX
SinglePackage
Install-LabSoftwarePackage -Path <String> [-CommandLine <String>] [-Timeout <Int32>] [-CopyFolder <Boolean>]
-ComputerName <String[]> [-DoNotUseCredSsp] [-AsJob] [-AsScheduledJob]
[-UseExplicitCredentialsForScheduledJob] [-UseShellExecute] [-ExpectedReturnCodes <Int32[]>] [-PassThru]
[-NoDisplay] [-ProgressIndicator <Int32>] [<CommonParameters>]
SingleLocalPackage
Install-LabSoftwarePackage -LocalPath <String> [-CommandLine <String>] [-Timeout <Int32>]
[-CopyFolder <Boolean>] -ComputerName <String[]> [-WorkingDirectory <string>][-DoNotUseCredSsp] [-AsJob] [-AsScheduledJob]
[-UseExplicitCredentialsForScheduledJob] [-UseShellExecute] [-ExpectedReturnCodes <Int32[]>] [-PassThru]
[-NoDisplay] [-ProgressIndicator <Int32>] [<CommonParameters>]
MulitPackage
Install-LabSoftwarePackage [-Timeout <Int32>] -Machine <Machine[]> -SoftwarePackage <SoftwarePackage>
[-WorkingDirectory <string>] [-DoNotUseCredSsp] [-AsJob] [-AsScheduledJob] [-UseExplicitCredentialsForScheduledJob] [-UseShellExecute]
[-ExpectedReturnCodes <Int32[]>] [-PassThru] [-NoDisplay] [-ProgressIndicator <Int32>] [<CommonParameters>]
DESCRIPTION
Installs a lab software package on one or more lab machines
EXAMPLES
Example 1
PS C:\> Install-LabSoftwarePackage -Path $labsources\SoftwarePackages\7zip.exe -CommandLine '/S' -ComputerName Host1,Host2
From the LabSources folder, install the application 7zip.exe on one or more lab VMs.
Example 2
PS C:\> Install-LabSoftwarePackage -LocalPath C:\7zip.exe -CommandLine '/S' -ComputerName Host1,Host2
From the machines' local path C:\7zip.exe, install the application 7zip.exe on one or more lab VMs.
PARAMETERS
-AsJob
Indicates that the cmdlet should run in the background
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-AsScheduledJob
Indicates that the installation should be executed in a scheduled job, if it does not work otherwise
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-CommandLine
The package command line
Type: String
Parameter Sets: SinglePackage, SingleLocalPackage
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ComputerName
The computer names
Type: String[]
Parameter Sets: SinglePackage, SingleLocalPackage
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CopyFolder
Indicates if the parent folder of the software package should be copied entirely to the target machine
Type: Boolean
Parameter Sets: SinglePackage, SingleLocalPackage
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DoNotUseCredSsp
Indicates that CredSSP should not be used
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-ExpectedReturnCodes
The list of expected return codes, e.g. 0,3010
Type: Int32[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-LocalPath
The local path on the target machine
Type: String
Parameter Sets: SingleLocalPackage
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Machine
The lab machines
Type: Machine[]
Parameter Sets: MulitPackage
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NoDisplay
Indicates if output should be suppressed
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-PassThru
Indicates if the results should be passed back to the caller
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Path
The source path of the package to install
Type: String
Parameter Sets: SinglePackage
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressIndicator
Every n seconds, print a . to the console
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SoftwarePackage
The lab software package
Type: SoftwarePackage
Parameter Sets: MulitPackage
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Timeout
The installation timeout in minutes
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-UseExplicitCredentialsForScheduledJob
Use credentials instead of logged on account for the scheduled job
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-UseShellExecute
Indicates that the ProcessStartInfo property UseShellExecute should be used
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-WorkingDirectory
The working directory for the installation process, sometimes required.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
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.