Closed Plork closed 2 years ago
Thanks for the PR!
Given I presume you'd only want to use this to disable the restart, I'm thinking it might be nicer to make this an 'opt-in' parameter..
eg call it '\DisableRestartWinRM` and only add it to the args list if it is passed in:
if ($pp['RESTARTWINRM']) {
$restart_winrm = "RESTART_WINRM=0"
}
fine with me, thats the only discussion I was looking for ;) was exactly my internal debat.
naming parameters is alway the hardest thing :D
Will change the script
I rewrote arguments to be more clear for optional flags. also less struggles with quotes like this.
apologies for my editor removing trailing spaces :S
I have a macbook atm, so didnt find a way to test this yet. @flcdrg
I tested this out, but it failed. Missing a space I think
ERROR: Running ["C:\Windows\System32\msiexec.exe" /i "C:\Users\david\AppData\Local\Temp\chocolatey\windows-admin-center\1.3.44065.0\WindowsAdminCenter2110.msi" /qn norestart SME_PORT=6516 SSL_CERTIFICATE_OPTION=generate RESTART_WINRM=0/l*v "C:\Users\david\AppData\Local\Temp\chocolatey\windows-admin-center.1.3.44065.0.MsiInstall.log" ] was not successful. Exit code was '1639'. Exit code indicates the following: The command line arguments passed to the MSI are incorrect. If you passed in additional arguments, please adjust. Otherwise followup with the package maintainer(s) to get this fixed. This is most likely an issue with the 'windows-admin-center' package and not with Chocolatey itself. Please follow up with the package maintainer(s) directly..
The install of windows-admin-center was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\windows-admin-center\tools\chocolateyinstall.ps1'.
See log for details.
thnx for the test!! I missed those
I've pushed a new version with this change. Hopefully it will appear soon
add the option to disable the restart of winrm with admin center install.