I have Windows 2008 64bit servers and I need to install some patches on
them, ideally using winrs and wusa.exe. I have a powershell (V1) script
which goes through a list of servers and attempts to install a SCOM patch. Ie:
$files = dir kb*\2008\*64.msu | %{$_.name}
$WUSA = "C:\windows\system32\wusa.exe"
cat servers.txt | %{
foreach ($file in $files){
cp $file \\$_\c$
"Doing: `"$WUSA c:\$file /quiet /norestart`" "
winrs /r:$_ `"$WUSA c:\$file /quiet /norestart`"
}
}
On the client, in the events, I get this “Access denied” error, ie.
The Windows update could not be installed because of an error: 2147942405
"Access is denied." (Command line: ""C:\Windows\system32\wusa.exe"
"C:\Windows6.0-KB951116-x64.msu" /quiet /norestart ")
I started the Powershell console with “Run as Administrator”, so it starts
from an elevated console. It this the “double hop” problem where we cannot
call another program and use admin privileges? Is there a way around this?
Thanks!,
I've never actually 100% confirmed this to myself, but I believe winrs
does not use the current user's credentials, so you'll actually have
to fire off a username and password with the command.
I'm not close to a machine with winrs right now. Something simple
like:
winrs .. /u:Domain/Username /p:Password (I can't remember if the
domain+username is with a "/" or "\".)
Marco