none
Hide Certain Windows Update via CMD or Group Policy RRS feed

  • Question

  • Hi all,

    I would like to create a batch file or using Group Policy to hide certain Windows Updates to about 100 PCs. The update I want to hide is KB2846071.

    Kindly advise.

    Thank you.

    Tuesday, August 13, 2013 3:17 AM

Answers

  • Hi,

    There is no command or policy which we can hide specific update. Please run below script, it might help your need.

    ***********

    Dim hideupdates(7)
    hideupdates
    (0) = "Microsoft Security Essentials - KB2267621"
    hideupdates
    (1) = "Microsoft Security Essentials - KB2691894"
    hideupdates
    (2) = "Bing Desktop"
    hideupdates
    (3) = "Windows Internet Explorer 9 for Windows 7"
    hideupdates
    (4) = "Windows Internet Explorer 9 for Windows 7 for x64-based Systems"
    hideupdates
    (5) = "KB971033"
    hideupdates
    (6) = "Update for Windows 7 for x64-based Systems (KB971033)"
    hideupdates
    (7) = "KB2483139"

    set updateSession = createObject("Microsoft.Update.Session")
    set updateSearcher = updateSession.CreateupdateSearcher()

    Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software'")

    For i = 0 To searchResult.Updates.Count-1
    set update = searchResult.Updates.Item(i)
    For j = LBound(hideupdates) To UBound(hideupdates)
    'MsgBox hideupdates(j)
    if instr(1, update.Title, hideupdates(j), vbTextCompare) = 0 then
      '
    Wscript.echo "No match found for " & hideupdates(j)
    else
    Wscript.echo "Hiding " & hideupdates(j)
    update
    .IsHidden = True
    end if
    Next
    Next

    ******************************

    Regards,


    MD Disclaimer: The opinion expressed herein are my own knowledge. Deploy this at your own risk. Whenever you see a helpful reply, just click on “Propose As Answer” / “Marked As Answer” and please do "VOTE".

    • Marked as answer by Kindovic Wednesday, August 14, 2013 5:49 AM
    Tuesday, August 13, 2013 8:26 AM

All replies

  • Hi,

    There is no command or policy which we can hide specific update. Please run below script, it might help your need.

    ***********

    Dim hideupdates(7)
    hideupdates
    (0) = "Microsoft Security Essentials - KB2267621"
    hideupdates
    (1) = "Microsoft Security Essentials - KB2691894"
    hideupdates
    (2) = "Bing Desktop"
    hideupdates
    (3) = "Windows Internet Explorer 9 for Windows 7"
    hideupdates
    (4) = "Windows Internet Explorer 9 for Windows 7 for x64-based Systems"
    hideupdates
    (5) = "KB971033"
    hideupdates
    (6) = "Update for Windows 7 for x64-based Systems (KB971033)"
    hideupdates
    (7) = "KB2483139"

    set updateSession = createObject("Microsoft.Update.Session")
    set updateSearcher = updateSession.CreateupdateSearcher()

    Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software'")

    For i = 0 To searchResult.Updates.Count-1
    set update = searchResult.Updates.Item(i)
    For j = LBound(hideupdates) To UBound(hideupdates)
    'MsgBox hideupdates(j)
    if instr(1, update.Title, hideupdates(j), vbTextCompare) = 0 then
      '
    Wscript.echo "No match found for " & hideupdates(j)
    else
    Wscript.echo "Hiding " & hideupdates(j)
    update
    .IsHidden = True
    end if
    Next
    Next

    ******************************

    Regards,


    MD Disclaimer: The opinion expressed herein are my own knowledge. Deploy this at your own risk. Whenever you see a helpful reply, just click on “Propose As Answer” / “Marked As Answer” and please do "VOTE".

    • Marked as answer by Kindovic Wednesday, August 14, 2013 5:49 AM
    Tuesday, August 13, 2013 8:26 AM
  • Hi Mubasshir Dadarkar,

    Thanks for ur help!!

    Wednesday, August 14, 2013 5:49 AM
  • That script is from this post by user NDog on the SS64 forum:
    http://ss64.org/viewtopic.php?pid=6795

    You obviously didn't even test it, otherwise you would have realized that it requires additional instructions.

    Also, you are supposed to format that script as a code block so that it's easier to copy and retains tabs, not just wildly paste it in as body text.

    Typical half-assed Technet poster...


    Thursday, January 14, 2016 5:22 AM