Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install-LabSoftwarePackage and an MSI file #42

Open
asparrowhawk opened this issue Nov 14, 2018 · 10 comments
Open

Install-LabSoftwarePackage and an MSI file #42

asparrowhawk opened this issue Nov 14, 2018 · 10 comments
Assignees

Comments

@asparrowhawk
Copy link

Following a successful run of Install-Lab with a single Windows 7 Machine I am getting the following error when trying to install an MSI file:

PS C:\Users\adams\Documents> Install-LabSoftwarePackage -ComputerName OMS -Path $labSources\SoftwarePackages\OemMgmtSetu
p.msi -CommandLine '/qn' -Verbose
VERBOSE: Install-LabSoftwarePackage Entering...
(ComputerName=OMS,Path=D:\LabSources\SoftwarePackages\OemMgmtSetup.msi,CommandLine=/qn,Verbose=True)
VERBOSE: Get-LabVM Entering... (ComputerName=OMS)
13:22:22|22:54:57|00:00:00.000| Installing software package 'D:\LabSources\SoftwarePackages\OemMgmtSetup.msi' on machine
s 'OMS'
VERBOSE: Get-LabVM Entering... (ComputerName=OMS,IncludeLinux=True)
VERBOSE: Get-LabVMStatus...leaving...(Time elapsed: 00:00:00:053)
VERBOSE: Starting background job for 'Installation of 'C:\OemMgmtSetup.msi''
13:22:22|22:54:57|00:00:00.083| - Copying files and initiating setup on 'OMS' and waiting for completionVERBOSE: Invoke-
LabCommand Entering...
(ComputerName=OMS,DependencyFolderPath=D:\LabSources\SoftwarePackages\OemMgmtSetup.msi,DoNotUseCredSsp=<null>,PassThru=
True,ScriptBlock=
        Install-SoftwarePackage @installParams
  ,NoDisplay=True,AsJob=True,ActivityName=Installation of
'C:\OemMgmtSetup.msi',Variable=System.Management.Automation.PSVariable[](1),Function=System.Management.Automation.Funct
ionInfo[](1))
VERBOSE: Executing lab command activity 'Installation of 'C:\OemMgmtSetup.msi'' on machines 'OMS'
VERBOSE: Get-LabVM Entering... (IncludeLinux=True)
VERBOSE: Get-LabVM Entering... (ComputerName=OMS,IncludeLinux=True)
VERBOSE: Get-LabVM Entering... (ComputerName=OMS,IncludeLinux=True)
VERBOSE: Get-LabVMStatus...leaving...(Time elapsed: 00:00:00:031)
VERBOSE: Creating session to computer(s) 'OMS'
VERBOSE: New-LabPSSession Entering...
(ComputerName=OMS,DoNotUseCredSsp=<null>,UseLocalCredential=<null>,Credential=<null>)
VERBOSE: Get-LabVM Entering... (ComputerName=OMS,IncludeLinux=True)
VERBOSE: Connecting to machine 'OMS' using the DNS name 'OMS'
VERBOSE: Creating a new PSSession to machine 'OMS:5985' (UserName='OMS\Administrator', Password='Somepass1',
DoNotUseCredSsp='False')
VERBOSE: Get-LabVM Entering... (ComputerName=OMS)
VERBOSE: Session OMS_535d5d45-da02-43b0-8d2c-3fd94db2b30f is available and will be reused
VERBOSE: New-LabPSSession...leaving - return value is 'Session IDs: 6'...(Time elapsed: 00:00:00:015)
VERBOSE: Adding functions 'Install-SoftwarePackage' to session
You must provide a value expression on the right-hand side of the '-' operator.
    + CategoryInfo          : ParserError: (:) [Set-Item], ParseException
    + FullyQualifiedErrorId : ExpectedValueExpression,Microsoft.PowerShell.Commands.SetItemCommand
    + PSComputerName        : OMS

VERBOSE: Adding variables 'System.Management.Automation.LocalVariable' to session
VERBOSE: Invoke-LWCommand Entering...
(AsJob=True,DependencyFolderPath=D:\LabSources\SoftwarePackages\OemMgmtSetup.msi,ComputerName=OMS,Retries=3,PassThru=Tr
ue,ScriptBlock=
        Install-SoftwarePackage @installParams

,Verbose=True,Session=System.Management.Automation.Runspaces.PSSession[](1),RetryIntervalInSeconds=10,ActivityName=Inst
allation of 'C:\OemMgmtSetup.msi')
VERBOSE: Starting Activity 'Installation of 'C:\OemMgmtSetup.msi''
VERBOSE: Copying files from 'D:\LabSources\SoftwarePackages\OemMgmtSetup.msi' to OMS...
VERBOSE: Finished Installation Activity 'Installation of 'C:\OemMgmtSetup.msi''
VERBOSE: Invoke-LWCommand...leaving...(Time elapsed: 00:00:00:195)
VERBOSE: Invoke-LabCommand...leaving...(Time elapsed: 00:00:00:207)
VERBOSE: Waiting on job ID '332' with name 'Installation of 'C:\OemMgmtSetup.msi''
..
Write-Error : The term 'Install-SoftwarePackage' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At C:\Program Files\WindowsPowerShell\Modules\AutomatedLabWorker\5.1.0.115\AutomatedLabWorker.psm1:895 char:17
+                 Write-Error -ErrorRecord $jobError
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Install-SoftwarePackage:String) [Write-Error], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

VERBOSE: Job ID '' with name '' finished
13:22:36|22:55:11|00:00:14.326| - Installation done
VERBOSE: Install-LabSoftwarePackage...leaving...(Time elapsed: 00:00:00:060)

The host is Windows 10 Pro, 1803 PowerShell 5.1.17134.228, AutomatedLab 5.1.0.115

Lab details:

PS C:\Users\adams\Documents> Show-LabDeploymentSummary -Detailed
14:58:32|00:31:07|00:13:04.138| ---------------------------------------------------------------------------
14:58:32|00:31:07|00:13:04.147| Setting up the lab took 0 hour, 31 minutes and 7 seconds
14:58:32|00:31:07|00:13:04.154| Lab name is 'OmsInstallation' and is hosted on 'HyperV'. There are 1 machine(s) and 1 ne
twork(s) defined.
14:58:32|00:31:07|00:13:04.161|
14:58:32|00:31:07|00:13:04.169| ----------------------------- Network Summary -----------------------------
14:58:32|00:31:07|00:13:04.197|
14:58:32|00:31:07|00:13:04.205| Name            AddressSpace    SwitchType AdapterName IssuedIpAddresses
14:58:32|00:31:07|00:13:04.213| ----            ------------    ---------- ----------- -----------------
14:58:32|00:31:07|00:13:04.220| OmsInstallation 192.168.11.0/24   Internal                             1
14:58:32|00:31:07|00:13:04.228|
14:58:32|00:31:07|00:13:04.235|
14:58:32|00:31:07|00:13:04.242| ----------------------------- Domain Summary ------------------------------
14:58:32|00:31:07|00:13:04.253| ------------------------- Virtual Machine Summary -------------------------
14:58:32|00:31:07|00:13:04.285|
14:58:32|00:31:07|00:13:04.292| Name DomainName IpAddress         Roles OperatingSystem        Local Admin   Password
14:58:32|00:31:07|00:13:04.298| ---- ---------- ---------         ----- ---------------        -----------   --------
14:58:32|00:31:07|00:13:04.309| OMS             {192.168.11.0/24} {}    Windows 7 Professional Administrator Somepass1
14:58:32|00:31:07|00:13:04.315|
14:58:32|00:31:07|00:13:04.323|
14:58:32|00:31:07|00:13:04.329| ---------------------------------------------------------------------------
14:58:32|00:31:07|00:13:04.336| Please use the following cmdlets to interact with the machines:
14:58:33|00:31:07|00:13:04.344| - Get-LabVMStatus, Get, Start, Restart, Stop, Wait, Connect, Save-LabVM and Wait-LabVMRe
start (some of them provide a Wait switch)
14:58:33|00:31:07|00:13:04.351| - Invoke-LabCommand, Enter-LabPSSession, Install-LabSoftwarePackage and Install-LabWindo
wsFeature (do not require credentials and
14:58:33|00:31:07|00:13:04.357|   work the same way with Hyper-V and Azure)
14:58:33|00:31:07|00:13:04.363| - Checkpoint-LabVM, Restore-LabVMSnapshot and Get-LabVMSnapshot (only for Hyper-V)
14:58:33|00:31:07|00:13:04.369| - Get-LabInternetFile downloads files from the internet and places them on LabSources (l
ocally or on Azure)
14:58:33|00:31:07|00:13:04.377| ---------------------------------------------------------------------------
@nyanhp
Copy link
Member

nyanhp commented Nov 14, 2018

PowerShell 2 issue with WIndows 7. I will look into it, thank you for reporting this!

@nyanhp nyanhp self-assigned this Nov 14, 2018
@asparrowhawk
Copy link
Author

For your information the source ISO for the Windows 7 Machine was en_windows_7_professional_with_sp1_x64_dvd_u_676939.iso.

@nyanhp
Copy link
Member

nyanhp commented Nov 14, 2018

I already have an idea what's going wrong. It sounds suspiciously like the -in operator has been used. I am at my customer at the moment, but a fix will be coming this evening.

We transfer a script block to the remote machine, which means that -in will fail on a plain Win7/2008R2 machine and we need to use -contains instead.

@nyanhp nyanhp transferred this issue from AutomatedLab/AutomatedLab Nov 14, 2018
@nyanhp nyanhp closed this as completed in c65944a Nov 14, 2018
@nyanhp
Copy link
Member

nyanhp commented Nov 14, 2018

Hi @asparrowhawk , please do an Install-Module AutomatedLab.Common -Force and update AutomatedLab.Common to the latest version (1.1.100).

It really was -notin, as well as the type accelerator pscredential which was also incompatible. After that, install-LabSoftwarePackage works again with PowerShell 2.

@asparrowhawk
Copy link
Author

Sorry for the slow response. Many thanks for looking at this issue so promptly.

I have updated the AutomatedLab.Common to the latest version but I am seeing a new issue:

PS D:\> Install-LabSoftwarePackage -ComputerName OMS -Path $labSources\SoftwarePackages\OemMgmtSetup.msi -CommandLine '/
qn' -Verbose
VERBOSE: Install-LabSoftwarePackage Entering...
(ComputerName=OMS,Path=D:\LabSources\SoftwarePackages\OemMgmtSetup.msi,CommandLine=/qn,Verbose=True)
VERBOSE: Get-LabVM Entering... (ComputerName=OMS)
15:11:30|00:09:51|00:00:00.000| Installing software package 'D:\LabSources\SoftwarePackages\OemMgmtSetup.msi' on machine
s 'OMS'
VERBOSE: Get-LabVM Entering... (ComputerName=OMS,IncludeLinux=True)
VERBOSE: Get-LabVMStatus...leaving...(Time elapsed: 00:00:00:063)
VERBOSE: Starting background job for 'Installation of 'C:\OemMgmtSetup.msi''
15:11:30|00:09:51|00:00:00.120| - Copying files and initiating setup on 'OMS' and waiting for completionVERBOSE: Invoke-
LabCommand Entering...
(ComputerName=OMS,DependencyFolderPath=D:\LabSources\SoftwarePackages\OemMgmtSetup.msi,DoNotUseCredSsp=<null>,PassThru=
True,ScriptBlock=
        Install-SoftwarePackage @installParams
  ,NoDisplay=True,AsJob=True,ActivityName=Installation of
'C:\OemMgmtSetup.msi',Variable=System.Management.Automation.PSVariable[](1),Function=System.Management.Automation.Funct
ionInfo[](1))
VERBOSE: Executing lab command activity 'Installation of 'C:\OemMgmtSetup.msi'' on machines 'OMS'
VERBOSE: Get-LabVM Entering... (IncludeLinux=True)
VERBOSE: Get-LabVM Entering... (ComputerName=OMS,IncludeLinux=True)
VERBOSE: Get-LabVM Entering... (ComputerName=OMS,IncludeLinux=True)
VERBOSE: Get-LabVMStatus...leaving...(Time elapsed: 00:00:00:028)
VERBOSE: Creating session to computer(s) 'OMS'
VERBOSE: New-LabPSSession Entering...
(ComputerName=OMS,DoNotUseCredSsp=<null>,UseLocalCredential=<null>,Credential=<null>)
VERBOSE: Get-LabVM Entering... (ComputerName=OMS,IncludeLinux=True)
VERBOSE: Connecting to machine 'OMS' using the DNS name 'OMS'
VERBOSE: Creating a new PSSession to machine 'OMS:5985' (UserName='OMS\Administrator', Password='Somepass1',
DoNotUseCredSsp='False')
VERBOSE: Get-LabVM Entering... (ComputerName=OMS)
VERBOSE: Session OMS_c28b8ade-76de-4b4d-b87c-52216df1bc89 is available and will be reused
VERBOSE: New-LabPSSession...leaving - return value is 'Session IDs: 2'...(Time elapsed: 00:00:00:014)
VERBOSE: Adding functions 'Install-SoftwarePackage' to session
VERBOSE: Adding variables 'System.Management.Automation.LocalVariable' to session
VERBOSE: Invoke-LWCommand Entering...
(AsJob=True,DependencyFolderPath=D:\LabSources\SoftwarePackages\OemMgmtSetup.msi,ComputerName=OMS,Retries=3,PassThru=Tr
ue,ScriptBlock=
        Install-SoftwarePackage @installParams

,Verbose=True,Session=System.Management.Automation.Runspaces.PSSession[](1),RetryIntervalInSeconds=10,ActivityName=Inst
allation of 'C:\OemMgmtSetup.msi')
VERBOSE: Starting Activity 'Installation of 'C:\OemMgmtSetup.msi''
VERBOSE: Copying files from 'D:\LabSources\SoftwarePackages\OemMgmtSetup.msi' to OMS...
VERBOSE: Finished Installation Activity 'Installation of 'C:\OemMgmtSetup.msi''
VERBOSE: Invoke-LWCommand...leaving...(Time elapsed: 00:00:02:453)
VERBOSE: Invoke-LabCommand...leaving...(Time elapsed: 00:00:02:463)
VERBOSE: Waiting on job ID '54' with name 'Installation of 'C:\OemMgmtSetup.msi''
..
Write-Error : Fatal error during installation
At C:\Program Files\WindowsPowerShell\Modules\AutomatedLabWorker\5.1.0.115\AutomatedLabWorker.psm1:895 char:17
+                 Write-Error -ErrorRecord $jobError
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [Write-Error], Win32Exception
    + FullyQualifiedErrorId : Fatal error during installation

VERBOSE: Job ID '' with name '' finished
15:11:39|00:10:01|00:00:09.403| - Installation done
VERBOSE: Install-LabSoftwarePackage...leaving...(Time elapsed: 00:00:06:125)
PS D:\>

I suspect this due to the MSI failing with the message that Application requires the .NET Framework 4.6.1 to be installed. Although it is recorded in the PowerShell output that there was a Fatal error during installation, it would be good to see the exit code of the process. Also the message VERBOSE: Job ID '' with name '' finished would be better if it included the correct Job ID and name.

Many thanks again for the fix.

@raandree
Copy link
Member

Sorry that it hit you again.

Is the file you share the file "OemMgmtSetup.msi" or a download link. Reproducing the issue is the easiest way to troubleshoot.

@raandree raandree reopened this Nov 26, 2018
@raandree raandree self-assigned this Nov 26, 2018
@asparrowhawk
Copy link
Author

Attached is an MSI file, while not same one used before, exhibits the same issue:

PS D:\> Install-LabSoftwarePackage -ComputerName Client -Path $labSources\SoftwarePackages\SetupWpfInstaller.msi -CommandLine '/qn' -Verbose
VERBOSE: Install-LabSoftwarePackage Entering...
(ComputerName=Client,Path=D:\LabSources\SoftwarePackages\SetupWpfInstaller.msi,CommandLine=/qn,Verbose=True)
VERBOSE: Get-LabVM Entering... (ComputerName=Client)
15:50:54|00:12:03|00:00:00.000| Installing software package 'D:\LabSources\SoftwarePackages\SetupWpfInstaller.msi' on machines 'Client'
VERBOSE: Get-LabVM Entering... (ComputerName=Client,IncludeLinux=True)
VERBOSE: Get-LabVMStatus...leaving...(Time elapsed: 00:00:00:043)
VERBOSE: Starting background job for 'Installation of 'C:\SetupWpfInstaller.msi''
15:50:54|00:12:03|00:00:00.112| - Copying files and initiating setup on 'Client' and waiting for completionVERBOSE: Invoke-LabCommand Entering...
(ComputerName=Client,DependencyFolderPath=D:\LabSources\SoftwarePackages\SetupWpfInstaller.msi,DoNotUseCredSsp=<null>,P
assThru=True,ScriptBlock=
        Install-SoftwarePackage @installParams
  ,NoDisplay=True,AsJob=True,ActivityName=Installation of
'C:\SetupWpfInstaller.msi',Variable=System.Management.Automation.PSVariable[](1),Function=System.Management.Automation.
FunctionInfo[](1))
VERBOSE: Executing lab command activity 'Installation of 'C:\SetupWpfInstaller.msi'' on machines 'Client'
VERBOSE: Get-LabVM Entering... (IncludeLinux=True)
VERBOSE: Get-LabVM Entering... (ComputerName=Client,IncludeLinux=True)
VERBOSE: Get-LabVM Entering... (ComputerName=Client,IncludeLinux=True)
VERBOSE: Get-LabVMStatus...leaving...(Time elapsed: 00:00:00:043)
VERBOSE: Creating session to computer(s) 'Client'
VERBOSE: New-LabPSSession Entering...
(ComputerName=Client,DoNotUseCredSsp=<null>,UseLocalCredential=<null>,Credential=<null>)
VERBOSE: Get-LabVM Entering... (ComputerName=Client,IncludeLinux=True)
VERBOSE: Connecting to machine 'Client' using the DNS name 'Client'
VERBOSE: Creating a new PSSession to machine 'Client:5985' (UserName='Client\Administrator', Password='Somepass1',
DoNotUseCredSsp='False')
VERBOSE: Get-LabVM Entering... (ComputerName=Client)
VERBOSE: Session Client_5254a06f-a117-44c8-9b2f-267d13c082f7 is available and will be reused
VERBOSE: New-LabPSSession...leaving - return value is 'Session IDs: 6'...(Time elapsed: 00:00:00:033)
VERBOSE: Adding functions 'Install-SoftwarePackage' to session
VERBOSE: Adding variables 'System.Management.Automation.LocalVariable' to session
VERBOSE: Invoke-LWCommand Entering...
(AsJob=True,DependencyFolderPath=D:\LabSources\SoftwarePackages\SetupWpfInstaller.msi,ComputerName=Client,Retries=3,Pas
sThru=True,ScriptBlock=
        Install-SoftwarePackage @installParams

,Verbose=True,Session=System.Management.Automation.Runspaces.PSSession[](1),RetryIntervalInSeconds=10,ActivityName=Inst
allation of 'C:\SetupWpfInstaller.msi')
VERBOSE: Starting Activity 'Installation of 'C:\SetupWpfInstaller.msi''
VERBOSE: Copying files from 'D:\LabSources\SoftwarePackages\SetupWpfInstaller.msi' to Client...
VERBOSE: Finished Installation Activity 'Installation of 'C:\SetupWpfInstaller.msi''
VERBOSE: Invoke-LWCommand...leaving...(Time elapsed: 00:00:00:131)
VERBOSE: Invoke-LabCommand...leaving...(Time elapsed: 00:00:00:163)
VERBOSE: Waiting on job ID '180' with name 'Installation of 'C:\SetupWpfInstaller.msi''
..
Write-Error : Fatal error during installation
At C:\Program Files\WindowsPowerShell\Modules\AutomatedLabWorker\5.1.0.115\AutomatedLabWorker.psm1:895 char:17
+                 Write-Error -ErrorRecord $jobError
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [Write-Error], Win32Exception
    + FullyQualifiedErrorId : Fatal error during installation

VERBOSE: Job ID '' with name '' finished
15:51:00|00:12:09|00:00:06.221| - Installation done
VERBOSE: Install-LabSoftwarePackage...leaving...(Time elapsed: 00:00:05:332)
PS D:\>

image

SetupWpfInstaller.zip

raandree added a commit that referenced this issue Dec 2, 2018
raandree added a commit to AutomatedLab/AutomatedLab that referenced this issue Dec 2, 2018
@raandree
Copy link
Member

raandree commented Dec 2, 2018

I have update the function and added a new exception class. This is how you get the error code if the code runs remotely:

Install-LabSoftwarePackage -Path C:\Users\randr\Downloads\SetupWpfInstaller.msi -CommandLine /qn -ComputerName Client7
$Error[0].Exception.SerializedRemoteException.ErrorCode

The verbose display issue is fixed in AL.

raandree added a commit that referenced this issue Dec 2, 2018
@asparrowhawk
Copy link
Author

I updated to the latest version of AutomatedLab.Common:

Get-Module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     5.1.0.115  AutomatedLab                        {Add-LabAzureSubscription, Add-LabCertificate, Add-LabVMUs...
Script     1.1.103    AutomatedLab.Common                 {Add-AccountPrivilege, Add-CATemplateStandardPermission, A...
Script     0.0        AutomatedLab.init
Script     5.1.0.115  AutomatedLabDefinition              {Add-LabAzureAppServicePlanDefinition, Add-LabAzureWebAppD...
Script     5.1.0.115  AutomatedLabNotifications           Send-ALNotification
Script     5.1.0.115  AutomatedLabUnattended              {Add-UnattendedNetworkAdapter, Add-UnattendedRenameNetwork...
Script     5.1.0.115  AutomatedLabWorker                  {Add-LWAzureLoadBalancedPort, Add-LWVMVHDX, Checkpoint-LWH...
Binary     1.0.0.0    CimCmdlets                          {Export-BinaryMiLog, Get-CimAssociatedInstance, Get-CimCla...
Script     5.1.0.115  HostsFile                           {Add-HostEntry, Clear-HostFile, Get-HostEntry, Remove-Host...
Binary     2.0.0.0    Hyper-V                             {Add-VMAssignableDevice, Add-VMDvdDrive, Add-VMFibreChanne...
Manifest   2.0.0.0    International                       {Get-WinAcceptLanguageFromLanguageListOptOut, Get-WinCultu...
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest   3.0.0.0    Microsoft.PowerShell.Security       {ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl...
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Manifest   3.0.0.0    Microsoft.WSMan.Management          {Connect-WSMan, Disable-WSManCredSSP, Disconnect-WSMan, En...
Manifest   1.0.0.0    NetTCPIP                            {Find-NetRoute, Get-NetCompartment, Get-NetIPAddress, Get-...
Script     1.0.1.141  newtonsoft.json                     {ConvertFrom-JsonNewtonsoft, ConvertTo-JsonNewtonsoft}
Binary     1.0.0.1    PackageManagement                   {Find-Package, Find-PackageProvider, Get-Package, Get-Pack...
Script     1.0.0.1    PowerShellGet                       {Find-Command, Find-DscResource, Find-Module, Find-RoleCap...
Script     5.1.0.115  PSFileTransfer                      {Copy-LabFileItem, Receive-Directory, Receive-File, Send-D...
Script     0.0        PsGet                               {Get-PsGetModuleHash, Get-PsGetModuleInfo, Install-Module,...
Script     5.1.0.115  PSLog                               {Get-CallerPreference, Start-Log, Stop-Log, Write-Debug...}
Script     2.0.0      PSReadline                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PS...
Binary     1.1.0.0    PSScheduledJob                      {Add-JobTrigger, Disable-JobTrigger, Disable-ScheduledJob,...
Manifest   2.0.0.0    PSWorkflow                          {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}
Manifest   2.0.0.0    Storage                             {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add...

I am seeing the following when trying to install the problem MSI:

Install-LabSoftwarePackage -ComputerName Client -Path $labSources\SoftwarePackages\SetupWpfInstaller.msi -CommandLine '/qn' -Verbose
VERBOSE: Install-LabSoftwarePackage Entering...
(ComputerName=Client,Path=D:\LabSources\SoftwarePackages\SetupWpfInstaller.msi,CommandLine=/qn,Verbose=True)
VERBOSE: Get-LabVM Entering... (ComputerName=Client)
12:56:05|00:11:21|00:00:00.000| Installing software package 'D:\LabSources\SoftwarePackages\SetupWpfInstaller.msi' on machines 'Client'
VERBOSE: Get-LabVM Entering... (ComputerName=Client,IncludeLinux=True)
VERBOSE: Get-LabVMStatus...leaving...(Time elapsed: 00:00:00:052)
VERBOSE: Starting background job for 'Installation of 'C:\SetupWpfInstaller.msi''
12:56:05|00:11:21|00:00:00.097| - Copying files and initiating setup on 'Client' and waiting for completionVERBOSE: Invoke-LabCommand Entering...
(ComputerName=Client,DependencyFolderPath=D:\LabSources\SoftwarePackages\SetupWpfInstaller.msi,DoNotUseCredSsp=<null>,P
assThru=True,ScriptBlock=
        Install-SoftwarePackage @installParams
  ,NoDisplay=True,AsJob=True,ActivityName=Installation of
'C:\SetupWpfInstaller.msi',Variable=System.Management.Automation.PSVariable[](1),Function=System.Management.Automation.
FunctionInfo[](1))
VERBOSE: Executing lab command activity 'Installation of 'C:\SetupWpfInstaller.msi'' on machines 'Client'
VERBOSE: Get-LabVM Entering... (IncludeLinux=True)
VERBOSE: Get-LabVM Entering... (ComputerName=Client,IncludeLinux=True)
VERBOSE: Get-LabVM Entering... (ComputerName=Client,IncludeLinux=True)
VERBOSE: Get-LabVMStatus...leaving...(Time elapsed: 00:00:00:027)
VERBOSE: Creating session to computer(s) 'Client'
VERBOSE: New-LabPSSession Entering...
(ComputerName=Client,DoNotUseCredSsp=<null>,UseLocalCredential=<null>,Credential=<null>)
VERBOSE: Get-LabVM Entering... (ComputerName=Client,IncludeLinux=True)
VERBOSE: Connecting to machine 'Client' using the DNS name 'Client'
VERBOSE: Creating a new PSSession to machine 'Client:5985' (UserName='Client\Administrator', Password='Somepass1',
DoNotUseCredSsp='False')
VERBOSE: Get-LabVM Entering... (ComputerName=Client)
VERBOSE: Session Client_5e5df176-40b4-4013-8518-ef00955c6a36 is available and will be reused
VERBOSE: New-LabPSSession...leaving - return value is 'Session IDs: 2'...(Time elapsed: 00:00:00:013)
VERBOSE: Adding functions 'Install-SoftwarePackage' to session
VERBOSE: Adding variables 'System.Management.Automation.LocalVariable' to session
VERBOSE: Invoke-LWCommand Entering...
(AsJob=True,DependencyFolderPath=D:\LabSources\SoftwarePackages\SetupWpfInstaller.msi,ComputerName=Client,Retries=3,Pas
sThru=True,ScriptBlock=
        Install-SoftwarePackage @installParams

,Verbose=True,Session=System.Management.Automation.Runspaces.PSSession[](1),RetryIntervalInSeconds=10,ActivityName=Inst
allation of 'C:\SetupWpfInstaller.msi')
VERBOSE: Starting Activity 'Installation of 'C:\SetupWpfInstaller.msi''
VERBOSE: Copying files from 'D:\LabSources\SoftwarePackages\SetupWpfInstaller.msi' to Client...
VERBOSE: Finished Installation Activity 'Installation of 'C:\SetupWpfInstaller.msi''
VERBOSE: Invoke-LWCommand...leaving...(Time elapsed: 00:00:00:980)
VERBOSE: Invoke-LabCommand...leaving...(Time elapsed: 00:00:00:993)
VERBOSE: Waiting on job ID '60' with name 'Installation of 'C:\SetupWpfInstaller.msi''
..
Write-Error : c:\Users\Administrator\AppData\Local\Temp\f3kmupmf.0.cs(7) :
'AutomatedLab.Common.Win32Exception.ErrorCode.get' must declare a body because it is not marked abstract or extern
c:\Users\Administrator\AppData\Local\Temp\f3kmupmf.0.cs(6) :     {
c:\Users\Administrator\AppData\Local\Temp\f3kmupmf.0.cs(7) : >>>         public new int ErrorCode { get; set; }
c:\Users\Administrator\AppData\Local\Temp\f3kmupmf.0.cs(8) :
At C:\Program Files\WindowsPowerShell\Modules\AutomatedLabWorker\5.1.0.115\AutomatedLabWorker.psm1:895 char:17
+                 Write-Error -ErrorRecord $jobError
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (c:\Users\Admini...tract or extern:CompilerError) [Write-Error], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Write-Error : c:\Users\Administrator\AppData\Local\Temp\f3kmupmf.0.cs(7) :
'AutomatedLab.Common.Win32Exception.ErrorCode.set' must declare a body because it is not marked abstract or extern
c:\Users\Administrator\AppData\Local\Temp\f3kmupmf.0.cs(6) :     {
c:\Users\Administrator\AppData\Local\Temp\f3kmupmf.0.cs(7) : >>>         public new int ErrorCode { get; set; }
c:\Users\Administrator\AppData\Local\Temp\f3kmupmf.0.cs(8) :
At C:\Program Files\WindowsPowerShell\Modules\AutomatedLabWorker\5.1.0.115\AutomatedLabWorker.psm1:895 char:17
+                 Write-Error -ErrorRecord $jobError
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (c:\Users\Admini...tract or extern:CompilerError) [Write-Error], Exception
    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand

Write-Error : Cannot add type. There were compilation errors.
At C:\Program Files\WindowsPowerShell\Modules\AutomatedLabWorker\5.1.0.115\AutomatedLabWorker.psm1:895 char:17
+                 Write-Error -ErrorRecord $jobError
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Write-Error], InvalidOperationException
    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand

Write-Error : Cannot find type [AutomatedLab.Common.Win32Exception]: make sure the assembly containing this type is
loaded.
At C:\Program Files\WindowsPowerShell\Modules\AutomatedLabWorker\5.1.0.115\AutomatedLabWorker.psm1:895 char:17
+                 Write-Error -ErrorRecord $jobError
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidType: (:) [Write-Error], PSArgumentException
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

VERBOSE: Job ID '' with name '' finished
12:56:13|00:11:29|00:00:07.967| - Installation done
VERBOSE: Install-LabSoftwarePackage...leaving...(Time elapsed: 00:00:06:231)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@asparrowhawk @raandree @nyanhp and others