MicrosoftDocs / Windows-Admin-Center-Ideas-and-Feedback

Windows Admin Center's hub for ideas and feedback.
Creative Commons Attribution 4.0 International
20 stars 9 forks source link

[Windows Admin Center - Updates - Install-Updates.ps1] - skipRestart Variable is being assigned the string False instead of the variable $False #268

Closed 777black777 closed 1 year ago

777black777 commented 1 year ago

Gateway Version: 1.3.2204.19002

Steps to reproduce the behavior:

  1. Go to Updates in the Tools sidebar.
  2. Click on Install Updates for the remote server.
  3. Navigate on the remote server to the SystemDrive.
  4. Go to the Users profile folder.
  5. Go to the specific user profile that is running Windows Admin Center.
  6. Go to AppData.
  7. Go to Local.
  8. In Local a new file is created called Install-Updates.ps1.
  9. On line 3 of that PowerShell script is the following:

$skipRestart = False; It should be $skipRestart = $False;

  1. If you run Install-Update.ps1 interactively in PowerShell, you will see that it errors.

Expected behavior $skipRestart = $False; should be used instead.

Screenshots & Additional context image image

777black777 commented 1 year ago

Windows Admin Center Build 1.4.2212.08003 no longer puts the updateIDs in the file, but rather passes them in as parameters to the PowerShell process. However, there seems to be an issue there as well at least for me.

Showing that variables that used to be written into the file have now become parameters being passed on the command line. image

Example Command Line: image image

You'll notice that the -updateIDs argument has 3 UpdateIDs, but the beginning one does not start with a single quote (') and the ending one does not end with a single quote ('). On my systems, the process does not update my servers due to the invalid literal string issue.

777black777 commented 1 year ago

This issue was tied to issue #279 which has now been resolved.