This project is read-only.


Install-windowsupdate error when restarting


When using the command Install-windowsupdate from BoxstarterShell everything works until the first restart. Errormessage as follows:
+ Boxstarter starting Downloading 1 updates
+ Boxstarter finished Downloading 1 updates 00:00:03.6635341
+ Boxstarter starting Installing Updates
This may take several minutes...
Boxstarter: Restart Required. Restarting now...
+ Boxstarter finished Installing Updates 00:41:21.6046543
Boxstarter: writing restart file
You cannot call a method on a null-valued expression.
At C:\Users\MyUser\AppData\Roaming\Boxstarter\Boxstarter.Bootstrapper\Invoke-Reboot.ps1:38 char:32
+ $Boxstarter.NoPassword.ToString <<<< ()
    + CategoryInfo          : InvalidOperation: (ToString:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

PS C:\>  
Closed Sep 16, 2014 at 6:12 AM by mwrock


bilong wrote Mar 6, 2014 at 6:16 AM

Just hit this myself. Installed Boxstarter on a brand new VM, but rather than using one of my usual scripts, I manually ran Install-WindowsUpdate from the Boxstarter prompt:


Dosenpfand wrote May 5, 2014 at 8:56 AM

I'm having this problem too. I'm using a fresh windows install and am using a user account with administrator privilges and a set password.
First i launched a PowerShell instance with administrator privilges, installed Boxstarter via Chocolatey ( cinst boxstarter ) launched the BoxStarter Shell ( BoxstarterShell.bat ) and launched the update process ( Install-WindowsUpdate -AcceptEula ) and when it tries to write the restart file it fails with the same error.

mwrock wrote May 5, 2014 at 10:28 AM

Currently, Install-WindowsUpdate only works inside of a Boxstarter package install run. You could create a package with just this command inside and install it in order to only install updates. This will be addressed in a future release.

mwrock wrote Sep 16, 2014 at 6:11 AM

Migrated to

** Closed by mwrock 09/15/2014 10:11PM