Closed acudovs closed 4 years ago
:white_check_mark: Build windows-openstack-imaging-tools 1.0.227 completed (commit https://github.com/cloudbase/windows-openstack-imaging-tools/commit/2bda0ddfed by @AlekseyChudov)
Thank you for the fix, I have overlooked this PS quirk.
First logon animation is always disabled and Administrator account is always enabled on Windows client versions because of bug in conditions that always return true.
To compare the return value of a function in a conditional we must put it in parentheses or assign the return value of the function to a variable and use that variable in the conditional. Otherwise we just call Is-WindowsClient with additional parameter $and = $false which is ignored.
Related discussion https://stackoverflow.com/questions/15930038/condition-with-a-function-call-in-powershell