none
PSWindowsupdate - Win8.1 -Confirm:$false error RRS feed

  • Question

  • Hello,

    I am testing the PSWindowsupdate script's on a windows 8.1 machine.

    I am getting the following error when I try to use the "-confirm:$false" switch.

    This does work fine on windows 10.

    Powershell 4.0

    I have reached out to the author, but have had no responses.

    Hide-Windowsupdate -KBArticleID KB4503283 -confirm:$false -verbose

    Hide-Winodwsupdate : HOSTNAME: You don't have permission toperform this task.

    At line:1 char:1

    + Hide-Windowsupdate -KbArticleID KB4503283 -confirm:$false -verbose

    +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + Category info                   : CloseError: (:) [Get-WinodwsUpdate], Exception

    + FulltQualifiedErrorID: 0x80240044, PSWindowsupdate.GetWindowsUpdate.

    If I run the same command without the confirm switch, I get prompted to confirm the action.

    I have tried -force and that also does not work.

    PSWindowsupdate 2.1.1.2


    Appreciate the assistance!


    • Edited by vs2017sv Tuesday, June 25, 2019 5:15 PM
    Tuesday, June 25, 2019 5:15 PM

All replies

  • Many KB articles cannot be hidden.  Also you have a permissions issue.  None of this has anything to do with scripting.


    \_(ツ)_/

    Tuesday, June 25, 2019 5:31 PM
  • I am logged in as a admin

    Running PS as a admin

    Execution Policy is set to remote signed.


    Tuesday, June 25, 2019 5:48 PM
  • You need to run elevated and still some KBs cannot be hidden. 


    \_(ツ)_/

    Tuesday, June 25, 2019 6:25 PM
  • Thank you.

    I am actually running elevated as well.

    I believe you are correct that this is a permission issue.

    Now to try and find what is causing it... 


    Thanks

    Tuesday, June 25, 2019 6:41 PM
  • Some KBs cannot be hidden.  If the KB is installed it cannot be hidden.  If the KB does not apply to the system it cannot be hidden.

    Why do you want to hide this?


    \_(ツ)_/

    Tuesday, June 25, 2019 6:54 PM
  • I am simply trying to test these scripts out on all different flavors of Windows.

    I was under the impression that all updates could be hidden if they were not installed.

    I believe a WSUS server would allow you to block any update prior to it being installed.


    Tuesday, June 25, 2019 7:45 PM
  • WSUS is a completely different thing.  The updates are tagged at the WSUS server and not on the client.

    Post is WSUS forum for help with using WSUS.


    \_(ツ)_/

    Tuesday, June 25, 2019 8:00 PM
  • You have to carefully read the complete article.


    \_(ツ)_/

    Tuesday, June 25, 2019 8:22 PM
  • Could you please link me to the article you are referring to?

    Tuesday, June 25, 2019 8:31 PM
  • Ask your online admin for help.  You cannot change this if you are not an admin.

    \_(ツ)_/

    Tuesday, June 25, 2019 8:45 PM
  • I have admin rights. Thanks

    Tuesday, June 25, 2019 10:13 PM
  • Do you have admin on the WSUS server?  Who is your WSUS admin?  That is the person to ask for help with this.

    Post in WSUS forum for further help with WSUS.


    \_(ツ)_/

    Tuesday, June 25, 2019 10:21 PM
  • There is no WSUS server in play.

    I was simply pointing out that I thought I could hide any update that is available for download like you are able to do with a WSUS server.


    Overall, I seem to be having all sorts of different issues with these pswindowsupdate tools.

    I just tested uninstalling a update on another non-WSUS machine after installing via 'install-windowsupdate' PS command and I get the following error...(No WSUS server is in play and these updates just came from widows).


    PS C:\windows\system32> Remove-WindowsUpdate -KBArticleID KB4503283

    Confirm
    Are you sure you want to perform this action?
    Performing the operation "(6/25/2019 7:00:40 PM) Remove (WUApi) Windows Update: 2019-06 Preview of Monthly Quality
    Rollup for Windows 8.1 for x64-based Systems (KB4503283)" on target "OEM1232".
    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
    WARNING: Exception from HRESULT: 0x80240028. The update could not be uninstalled because the request did not originate
    from a WSUS server.

    Tuesday, June 25, 2019 11:05 PM
  • WSUS and WindowsUpdate are not the same thing.  Some things cannot be hidden.


    \_(ツ)_/

    Tuesday, June 25, 2019 11:14 PM