What does wusa.exe return code 5 mean?
Solution 1:
Windows update will not permit you to perform installs over Powershell Remote sessions since it does not allow any remote authentication token. This does not only affect the running of routine updates but also the installation of windows features via dism and servermanager as well as many Microsoft MSIs. Looks like Windows Management 4 is among them. The best way around this is to create a scheduled task to perform this on the remote machine. As noted above PSEXEC works too provided provided file access ports are open and, if you are not in a domain environment, you have enabled LocalAccountTokenFilterPolicy.
I recently added this functionality to Boxstarter.org as of version 2.0. With this you can install chocolatey packages, windows features or windows updates remotely and Boxstarter will create a scheduled task from the remote powershell session. It will stream the output back to your session so it looks and feels like it is running from inside the session. See http://boxstarter.org/InstallingPackages#RemoteInstallations for details.
In Short the command looks like:
$cred=Get-Credential username
Install-BoxstarterPackage -ComputerName box1,box2 -Credential $cred -PackageName Powershell4