Manually Removing WSUS 3.0







if you find your WSUS 3.0 gets corrupted you may need to uninstall and reinstall it. I have noticed that depending on the corruption it may not be as easy to do this as first it looks
The following steps have helped me manually strip WSUS 3.0 (inclsp1 and sp2 updates) from the system when simple Add/Remove Programs wont work.
1. Download the SDK to obtain MSIZAP
http://download.microsoft.com/download/e/9/d/e9d80355-7ab4-45b8-80e8-983a48d5e1bd/msicuu2.exe
2. From a command prompt, type:
MSIZAP T {2C0D7E35-EE6E-4DC7-BA13-2C68AEDEB59D}
3. From a command prompt, type: sc delete wsusservice
4. Again, From a command prompt, type:
MSIZAP T {2C0D7E35-EE6E-4DC7-BA13-2C68AEDEB59D}
5. From a command prompt, type: iisreset
6. Run the following command to delete Windows Internal Database:
msiexec /x {CEB5780F-1A70-44A9-850F-DE6C4F6AA8FB} callerid=ocsetup.exe
7. Open IIS manager, delete all WSUS related virtual directories:
ApiRemoting30
ClientWebService
Content
DssAuthWebService
Inventory
ReportingWebService
Selfupdate
ServerSyncWebService
SimpleAuthWebService
8. Delete WSUS folder C:\Program Files\Update Services
Some other hints:
  • you may want to try uninstalling the “Windows Internal Database” from Add/Remove Programs first – I always to this as well
  • you may leave your WSUS main content/download folder intact – during the reinstall make sure you point WSUS to the right folder for your content – this saves downloading GBs of updates again
  • I found when deleting the “Program Files” folder some DLLs were in use – I just ignored and the WSUS reinstallation went through fine, even wihtout a reboot
READ MORE »

SCCM 2012 – Options for Removing Windows Updates






Recently, a client had an issue with a particular patch to Office interfering with a line of business application.  The patch in particular was KB 2826026 – Office 2010 update: October 8, 2013.  Normally the procedure to uninstall a patch is to use Group Policy or SCCM to push out the following Windows Update Stand Alone tool command:


WUSA /uninstall /kb:2826026
However this only works with Windows Operating System Updates (which are deployed in the MSU format).  When dealing with a software product update like this one for Office, the correct answer is to look in the registry for information about the update.
Browse to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\, and then search for the KB number of the update you need to remove.  Once found, look at the Uninstall String, and you’ll see a value like this:


"C:\Program Files\Common Files\Microsoft Shared\OFFICE14\Oarpmany.exe" /removereleaseinpatch "{90140000-0011-0000-0000-0000000FF1CE}" "{D7D96A96-F61F-48AD-B2DC-4F4B6938D2AB}" "1033" "0"
This command will remove the offending patch, but requires manual intervention (clicking Yes) and then will force a restart.  You can use these values with an MSIexec command though to run the removal of the patch through Windows Installer, which will allow for logging and standard reboot controls, etc.
Use this example to help you create your MSI command:

msiexec /package {90140000-0011-0000-0000-0000000FF1CE} MSIPATCHREMOVE={D7D96A96-F61F-48AD-B2DC-4F4B6938D2AB} /qb /norestart /l+ c:\windows\system32\ccm\logs\KB2826026_unins.txt
This may force the shutdown of Office, and will not complete until the system has restarted, however.
READ MORE »

Uninstall Windows Update with command line




Windows updates can be uninstalled via command line.

Uninstallation can be done using wusa and pkgmgr commands.

Please follow the methods:

Method 1:

Using WUSA Command:

Step 1:

a. Click on Start menu, click on Run.
b. In Run type as cmd.exe with elevated previlliges (right click on cmd.exe and choose "run as administrator") and type:

wusa /uninstall /kb:{update ID}
Example:

To uninstall update KB980302 the command will be following

wusa /uninstall /kb:980302

Step 2:

a. Download problematic update from Microsoft Download Center and place it to any folder i.e C:\Temp

b. Run cmd.exe with elevated previlliges (right click on cmd.exe and choose "run as administrator") and type:

wusa /uninstall {full hotfix name}

Example:

To uninstall update KB980302 32bit and in C:\Temp folder you have standalone version the command will be following

wusa /uninstall C:\Temp\Windows6.1-KB980302-x86.msu

Method 2:

USING PKGMGR COMMAND:

UNINSTALLING UPDATE:


a. Download problematic update from Microsoft Download Center and place it to any folder i.e C:\Temp

b. Run cmd.exe with elevated previlliges (right click on cmd.exe and choose "run as administrator")
c. Unpack update by using command prompt

the proper commands are following:

expand -f:*{update name}.msu {destination folder}

i.e

To unpack update Windows6.1-KB980302-x86.msu which is stored in C:\Temp folder and you want to unpack it to C:\Temp2 folder the command will be following

expand -f:* C:\TEMP\Windows6.1-KB980302-x86.msu C:\TEMP2

press ENTER

d.Choose any unused empty folder or create new folder i.e C:\Sandbox for temporary installation files.
e.Now you can uninstall update,the proper command have following form:

start /w pkgmgr /m:{full hotfix name}.cab /up /s:{sandobox folder}

where {sandbox folder} -any unused folder

For our example,the proper command will be following:

start /w pkgmgr /m:C:\Temp2\Windows6.1-KB980302-x86.cab /up /s:C:\Sandbox

press ENTER

Dependce from what kind of update it is -sometimes after a while appear popup to prompt reboot to apply changes or if any update doesn't require reboot to apply changes no messages are returned.Don't close command prompt until it finish.

READ MORE »

SCCM Report for All pending Windows updates






select

      CS.Name0,

      CS.UserName0,

case

when (sum(case when UCS.status=2 then 1 else 0 end))>0 then ('Needs '+(cast(sum(case when UCS.status=2 then 1 else 0 end)as varchar(10))+ ' Patches'))

else 'Good Client'

end as 'Status',

      ws.lasthwscan as 'Last HW scan',

      FCM.collectionID--,

from

      v_UpdateComplianceStatus UCS

left outer join dbo.v_GS_COMPUTER_SYSTEM  CS on CS.ResourceID = UCS.ResourceID

join v_CICategories_All catall2 on catall2.CI_ID=UCS.CI_ID

join v_CategoryInfo catinfo2 on catall2.CategoryInstance_UniqueID = catinfo2.CategoryInstance_UniqueID and catinfo2.CategoryTypeName='UpdateClassification'

left join v_gs_workstation_status ws on ws.resourceid=CS.resourceid

left join v_fullcollectionmembership FCM on FCM.resourceid=CS.resourceid

Where

      UCS.Status = '2'

and FCM.collectionid = 'SMS00001'

Group by

      CS.Name0,

      CS.UserName0,

      ws.lasthwscan,

      FCM.collectionID

Order by

      CS.Name0,

      CS.UserName0,

      ws.lasthwscan,

      FCM.collectionID
READ MORE »

SCCM Report of WSUS Supresedence relationship




select
cir.FromCIID [New CI],
info.BulletinID [New BulletinID],
info.ArticleID [New ArticleID],
info.Title [New Title],
info.InfoURL [New InfoURL],
info.DatePosted [New DatePosted],
cir.ToCIID [SUPERSEDED CI],
info2.BulletinID [Superseded BulletinID],
info2.ArticleID [Superseded ArticleID],
info2.Title [Superseded Title],
info2.InfoURL [Superseded InfoURL],
info2.DatePosted [Superseded DatePosted]
from v_CIRelation cir
left join v_UpdateInfo info on cir.FromCIID = info.CI_ID
left join v_UpdateInfo info2 on cir.ToCIID = info2.CI_ID
where RelationType = 6 and
((info.ArticleID = @KBNumber) OR (info2.ArticleID = @KBNumber))
order by info.BulletinID, info.ArticleID

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

PROMPT SQL:

SELECT articleID from v_updateinfo

READ MORE »