Hello, I seem to unable to get the Invoke-WUInstal
l command to run. When i run this it create the task on the target server but that task fails to run. This is on server 2012 / 2012 R2. It would also be nice if it would use my account for the task rather then the local system account.
The -AutoSelectOnly parameter seems to be not working as expected. Both the Pre search criteria and the Post search criteria show all available updates. But the download step only downloads a subset of available updates, unfortunately this subset is not the same as the list of updates which are shown as preselected when I run wuapp.exe. For example a fresh install of Win7SP1 with IE11 and .Net 4.5.1 and Office 2010 installed will find a total of 224 possible updates from Microsoft updates (important plus optional). So when using -AutoSelectOnly parameter, both pre and post criteria list this number. In wuapp.exe there are 181 preselected updates (in other words important updates). But the PS module only downloads 140 of them. I am not sure why the discrepancy. To get around this I have had to resort to usage of -NotCategory and -NotTitle instead and abandon use of -AutoSelectOnly parameter.
Hi all, I test this module, and i dont get any information from remote server. Test from my PC: PS C:\> Get-WUList -ComputerName nas PS C:\> Get-WUList -ComputerName nas -Debuger DEBUG: STAGE 0: Prepare environment DEBUG: Check if ComputerName in set DEBUG: STAGE 1: Get updates list DEBUG: Create Microsoft.Updat
e.Session object for nas DEBUG: Create Microsoft.Updat e.Session.Searc her object for nas DEBUG: Set source of updates to default (for nas) Windows Update DEBUG: Set pre search criteria: IsInstalled = 0 DEBUG: Search criteria is: IsInstalled = 0 PS C:\> Test from server: PS C:\> Get-WUList ComputerName Status KB Size Title ------------ ------ -- ---- ----- NAS ------ KB2668562 6 MB Microsoft Silver NAS D----- KB2953522 15 MB Sicherheitsupda t NAS D----- KB890830 7 MB Windows-Tool zum NAS D----- KB2965065 401 KB Update für Windo NAS D----- KB2920189 31 KB Sicherheitsupda t NAS D----- KB2926765 13 MB Sicherheitsupda t NAS D----- KB2931358 322 KB Sicherheitsupda t NAS D----- KB2931366 584 KB Sicherheitsupda t NAS D----- KB2954879 105 KB Update für .NET NAS D----- KB2950153 213 KB Update für Windo NAS ------ KB2955164 97 MB Update für Windo NAS D----- KB2956575 13 MB Update für Windo NAS D----- KB2958262 2 MB Update für Windo What is the problem? I deactivate the uac at the server, but no success. What should i do? Thx for the great modules. regards Carsten
Hi, Your module seems to require PS v3 as it uses, among other, Unblock-File. You should update your documentation as it precises PS v2 as a prereq. Thanks for you work.
HI I'm having an issue automating this script from a batch file. Using the following code the script runs in Windows 8 and 8.1, however it gives an error in Windows 7: powershell set-executionpo
licy remotesigned powershell import-module pswindowsupdate powershell get-wuinstall -acceptall -ignorereboot The error reads as follows (in 7): The term 'get-wuinstall' is not recognised as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:14 * get-wuinstall <<<< -acceptall -ignorereboot +CategoryInfo : ObjectNotFound: <get-wuinstall: String> , comma ndNotFoundExcep tion +FullyQualified ErrorIF : CommandNotFound Excception Any ideas?
Hello, I have exactly the same problem. When I just run powershell as admin and run these commands: :\> set-executionpo
licy remotesigned :\> import-module pswindowsupdate :\> get-wuinstall -acceptall -ignorereboot it works like a charm, but when I call the three lines from a batch file, the same thing happens as with Jason. Running the exact same batch file in windows 8.0 and 8.1 works like a charm. Maybe there is a difference in windows 7 powershell to windows 8 powershell (even though they're both version 2.0... Would really appreciate anyone's input on this... Thanks
To add insult to injury, When launching powershell from an elevated command prompt (just execute powershell.exe) I get a powershell prompt (I assume also elevated) Running the commands mentioned before I get the same errors. So I assume there is an issue calling powershell.exe (perhaps something to do with permissions?).
I'm glad to hear I'm not the only one. I have replicated the elevated command prompt issue as well. Still stuck for a solution though. I've looked into methods to call powershell as administrator from command line but as I'm using this in audit mode the administrator account doesn't have a password and the call to run as admin requires a passworded account. So I got stuck there as well.
Just create powershellscrip
t with those three commands and call that from cmd batch
So my RunUpdate.ps1 has the following in it: Set-ExecutionPo
licy RemoteSigned Import-Module PSWindowsUpdate Get-WUInstall -NotTitle "Bing" -acceptall -IgnoreReboot But if I call that from update.cmd it doesn't seem to do anything and it exits shortly after starting with no output. Update.cmd looks like this: powershell -executionpolic y remotesigned -file C:\Temp\RunUpda te.ps1
Forget that! Solved. From command line: POWERSHELL -ExecutionPolic
y RemoteSigned -File C:\Temp\RunUpda te.ps1 RunUpdate.ps1: Import-Module -Name PSWindowsUpdate Get-WUInstall -AcceptAll -IgnoreReboot -NotTitle Bing Also removed "unblock file" code from PSWindowsUpdate .psm1 Literally deleted the line: "Get-ChildItem -Path $PSScriptRoot | Unblock-File" save & exit Because of an error executing the Unblock-File command - something about permissions again. Also a Windows 7 only error.
Hi Can you add some extra switches to some of the scripts. In particular I would like to be able to automatically "AcceptAll" in the following modules: Add-WUServiceMa
nager Hide-WUUpdate Currently they don't respond to the "AcceptAll" command and although I can see the script in Get-WUInstall I'm not knowledgeable enough implement this code into the other modules myself.
First of all your module is wonderful I also want in my reporting whether installed windows update is successful or not. I read something about reliablity in wmi but could you merge the same in this module. Thanks SSINGH
I think what you're asking is answered just down the page. See the post from Rosco_CA.
Your module is a great help. I may have missed it but is there a way to get the date a patch was released?
Recently i am getting out put in history file like ===============
=============== =============== ==== KB : KB2267602 ComputerName : DDDDDDDDDDDD Operation : 1 ResultCode : 2 HResult : 0 Date : 4/15/2014 5:36:23 AM UpdateIdentity : System.__ComObj ect Title : Definition Update for Windows Defender - KB2267602 (Definition 1.169.2635.0) Description : Install this update to revise the definition files that are used to detect viruses, spyware, and other potentially unwanted software. Once you have installed this item, it cannot be removed. UnmappedResultC ode : 0 ClientApplicati onID : ServerSelection : 2 ServiceID : UninstallationS teps : System.__ComObj ect UninstallationN otes : SupportUrl : http://go.micro soft.com/fwlink /?LinkId=52661 Categories : System.__ComObj ect =============== =============== =============== =============== = Earlier this was coming in a single line. DDDDDDD 09-04-2014 10:49:12 KB915597 Definition Update for Windows Def... Please guide me why these changes are coming. Many thanks in advanced
Hi, Recently I have found that there are 3 updates that do not automatically install using the script. They require a "Update and Restart" for them to be installed. Is there anyway to resolve this? Thanks,