Comments (7)
This was a regression. In case of installing an MSI the path has to go to the parameter CommandLine and replaced by msiexec.exe.
In case of an MSI, you do not need to specify command line parameters as AL adds logging and /qn automatically. This is handled in Install-LWSoftwarePackage in AutomatedLabWorker.psm1.
I have tested this with these commands:
Install-LabSoftwarePackage -ComputerName bpull1 -Path E:\LabSources\SoftwarePackages\7z1602-x64.msi -PassThru -Verbose
Install-LabSoftwarePackage -ComputerName bpull1 -Path E:\LabSources\SoftwarePackages\sqlncli.msi -CommandLine '/qn IACCEPTSQLNCLILICENSETERMS=YES'
Install-LabSoftwarePackage -ComputerName bpull1 -Path E:\LabSources\SoftwarePackages\putty-64bit-0.68-installer.msi
This will be part of the next release. In the meantime just replace the file mentioned above.
from automatedlab.
thank you for help - not sure if i unterstand this correctly - "part of next release" - does you mean the commands you have tested with?
i tried both of your sample commands (putty and 7-zip) on another clientvm and received the following error:
Install-LabSoftwarePackage -ComputerName MPKCLT1 -Path D:\LabSources\SoftwarePackages\putty-64bit-0.68-installer.msi
Install-LabSoftwarePackage -ComputerName MPKCLT1 -Path D:\LabSources\SoftwarePackages\7z1602-x64.msi -PassThru -verbose
Error:
Cannot process argument transformation on parameter 'CommandLine'. Cannot convert value to type System.String.
+ CategoryInfo : InvalidData: (:) [New-InstallProcess], ParameterBindin...mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,New-InstallProcess
+ PSComputerName : MPKCLT1
...are the commands correct and will be working in the next version?
from automatedlab.
I have just updated the release here: https://github.com/AutomatedLab/AutomatedLab/releases/tag/4.0.0.1. Can you test it with this one please?
I have tested with this script and it completed successfully.
New-LabDefinition -Name 'SP1' -DefaultVirtualizationEngine HyperV
Add-LabMachineDefinition -Name AL1 -Memory 1GB -OperatingSystem 'Windows 10 Enterprise'
Install-Lab
Install-LabSoftwarePackage -ComputerName AL1 -Path $labSources\SoftwarePackages\7z1602-x64.msi
Install-LabSoftwarePackage -ComputerName AL1 -Path $labSources\SoftwarePackages\sqlncli.msi -CommandLine '/qn IACCEPTSQLNCLILICENSETERMS=YES'
Install-LabSoftwarePackage -ComputerName AL1 -Path $labSources\SoftwarePackages\putty-64bit-0.68-installer.msi
Install-LabSoftwarePackage -ComputerName AL1 -Path $labSources\SoftwarePackages\ClassicShell.exe -CommandLine '/quiet ADDLOCAL=ClassicStartMenu' -AsJob
Install-LabSoftwarePackage -ComputerName AL1 -Path $labSources\SoftwarePackages\Notepad++.exe -CommandLine /S -AsJob
Install-LabSoftwarePackage -ComputerName AL1 -Path $labSources\SoftwarePackages\winrar.exe -CommandLine /S -AsJob
from automatedlab.
i had installed version 4.0.0.0 - after updating to 4.0.0.1 it works perfectly! many thanks.
for others as reference - the following sample installs all needed Software on your labclientvm´s (7-Zip,Putty,Notepad++):
# install tools on all non-domain controllers
$clientsoft = @()
$clientsoft += Get-LabSoftwarePackage -Path $labSources\SoftwarePackages\7z1602-x64.msi
$clientsoft += Get-LabSoftwarePackage -Path $labSources\SoftwarePackages\npp.7.Installer.x64.exe -Commandline '/S'
$clientsoft += Get-LabSoftwarePackage -Path $labSources\SoftwarePackages\putty-64bit-0.68-installer.msi
Install-LabSoftwarePackages -Machine ( Get-LabMachine | ? { $_.Name -ne 'DC1' } ) -SoftwarePackage $clientsoft
one wish/enhancement request: i try to install RSAT Tools for Srv 2016 - but this is a msu package - so it would be great if you can extend the installsoftwarepackage cmdlet to call "wusa.exe name-of-package.msu /quiet" if path parameter is a msu file?
many thanks
from automatedlab.
Good to hear the we are making progress.
Concerning MSU files. We are using dism.exe to add the package (see AutomatedLabWorker.psm1, 366 - 376). Installing RSAT on Windows 10 works like this:
Install-LabSoftwarePackage -Path "$labSources\SoftwarePackages\RSAT Windows 10 x64.msu" -ComputerName POSHClient1
Invoke-LabCommand -ScriptBlock { Enable-WindowsOptionalFeature -FeatureName RSATClient -Online -NoRestart } -ComputerName POSHClient1
Restart-LabVM -ComputerName POSHClient1 -Wait
If you think there is a better way, we are happy for proposals.
from automatedlab.
thank you for help in this case and sorry it was my fault:
i tried exactly what you do in in the MSU installation part of AutomatedLabWorkser.psm1, line 376 without /quiet and seen that dism stucks in my case at 1.0% for a very long time - after 5 minutes, it jumped to 100% and sayed "finished with success" - another failure was that i had not rebooted the VM after this, in the case of installing RSAT without a reboot it seems that it looks like nothing is installed - only after a reboot all the RSAT tools a displayed - so two failures in my case - not waiting too long and no reboot after all...
Enable-WindowsOptionalFeature was not necessary in my case - my commands:
Install-LabSoftwarePackage -Path "$labSources\SoftwarePackages\WindowsTH-RSAT_WS2016-x64.msu" -ComputerName CLIENT1
Restart-LabVM -ComputerName CLIENT1 -Wait
..after reboot all RSAT tools sucessfully installed...
another idea to make it more easier to handle:
do you have a function for checking pending reboots in AL? - maybe it could be called after installing package (after line 376) and give the info back to the calling cmdlet - ie:
Install-LabSoftwarePackage -Path "$labSources\SoftwarePackages\WindowsTH-RSAT_WS2016-x64.msu" -ComputerName CLIENT1
..success - you have to reboot for finishing installation...
from automatedlab.
Right, your idea of implementing a function that checks for pending reboots or enhance an existing function sounds good. Want to take the task? :)
There is already some code available: https://gallery.technet.microsoft.com/scriptcenter/Get-PendingReboot-Query-bdb79542
from automatedlab.
Related Issues (20)
- [Bug]: WARNING: (544,45): warning CS0168: The variable 'e' is declared but never used HOT 1
- [New Feature]: Improve discoverability HOT 1
- [Bug]: Error when attempting to add a VM with Add-LabMachineDefinition HOT 4
- You are not connected to any servers. HOT 10
- [Bug]: WinRM port never opens
- Is there a way to install sysmon with options? HOT 2
- [New Feature]: Map Host Folders to VM HOT 2
- [Bug]: Timeout when 'Starting remaining machines' HOT 5
- [Bug]: Hyper-V VM created with -VmGeneration 1 fails to boot HOT 8
- [Bug]: Hyper-V VM having network adapter created with -UseDhcp gets static IP assigned HOT 4
- [New Feature]: Do not delete Virtual Switch during Remove-Lab HOT 1
- Get-Lab command only reports one response HOT 6
- [New Feature]: Support for Oracle Linux HOT 3
- [Bug]: CM-2103.ps1 not working, loose "lab context" in Customroles script, (Get-LabVM return NULL)
- [New Feature]: HOT 1
- [Bug]: Download of SysInternals suite sometimes fails HOT 1
- Documentation: List not formatted in markdown HOT 1
- [Bug]: Virtual network could not be created automatically HOT 1
- [Bug]: Custom role not installed, lab sources file share not accessible HOT 4
- [Bug]: Timeout Error Waiting for Active Directory to Start on Domain Controller HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from automatedlab.