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

instance_setup.ps1 report write-log error if $script:activate_instance_script_loc return is empty #223

Open
sylvainlavoie opened this issue Jul 13, 2022 · 0 comments

Comments

@sylvainlavoie
Copy link

Write-Log : Cannot bind argument to parameter 'msg' because it is an empty string.
At C:\Program Files\Google\Compute Engine\sysprep\instance_setup.ps1:251 char:15

  • Write-Log "$_"
    
  •           ~~~~
    
    • CategoryInfo : InvalidData: (:) [Write-Log], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Write-Log

Add where before the foreach solve the issue
& $script:activate_instance_script_loc | where {$} | ForEach-Object {
Write-Log "$
"

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

No branches or pull requests

1 participant