Thursday, 19 January 2012

Purging WDS database and clearing prestaging values from AD computers

Purging Auto-Add Database in WDS WDS purges approved computers from Auto-Add database every 30 days by default.
You can also change the retention period for approved computers record by running WDSUTIL /Set-Server /AutoAddPolicy /RetentionPeriod /Approved:Days command. (http://technet.microsoft.com/en-us/library/cc754289(WS.10).aspx)

To change the length of time approved computers are held in the Auto-Add database to 7 days.
WDSUTIL /Set-Server /AutoAddPolicy /RetentionPeriod /Approved:7

If you wan't to manually purge approved computers in Auto-Add database you can run wdsutil /delete-AutoAddDevices /DeviceType:ApprovedDevices command, or to delete all (approved, pending, rejected) you can visit this URL (http://technet.microsoft.com/en-us/library/cc770832(WS.10).aspx).

But this process doesn't clear computer's RemoteInstall/NetBootGUID property from Active Directory, so you might need to clear this value in AD.
Clear prestaging data in AD
If you also need to clear RemoteInstall GUID property from all prestaged machines in AD as WDSUtil only clears it's own Auto-Add database, you can use powershell commands below to do that.

  • To see a computer's NetbootGUID
    Get-ADComputer -Identity ComputerName -Properties NetbootGuid


  • To clear a computer's NetbootGUID
    Set-ADComputer -Identity ComputerName -clear NetbootGUID


  • To list all computers have NetboodGUID value
    Get-ADComputer -Filter {NetbootGUID -like "*"} -Properties NetbootGUID


  • To list all computers have NetboodGUID value by formatted output
    Get-ADComputer -Filter {NetbootGUID -like "*"} -Properties NetbootGUID,created | Format-List -Property name,distinguishedName,created,NetbootGUID


  • To list all computers older than a week and have NetboodGUID value by formatted output
    Get-ADComputer -Filter {NetbootGUID -like "*"} -Properties NetbootGUID,Created | ? {$_.Created -le ((get-date).addDays(-7))} | Format-List -Property name,distinguishedName,created,NetbootGUID


  • To clear NetbootGUID from all computers older than a week and have NetbootGUID value
    Get-ADComputer -Filter {NetbootGUID -like "*"} -Properties name,NetbootGUID,Created | ? {$_.Created -le ((get-date).addDays(-7))} | Set-ADComputer -clear NetbootGUID


  • To clear NetbootGUID from all computers older than a week and have NetbootGUID value (Shorter : we only need Created property for date equation)
    Get-ADComputer -Filter {NetbootGUID -like "*"} -Properties Created | ? {$_.Created -le ((get-date).addDays(-7))} | Set-ADComputer -clear NetbootGUID



To get more detail about
Set-ADComputer : http://technet.microsoft.com/en-us/library/ee617263.aspx
Get-ADComputer : http://technet.microsoft.com/en-us/library/ee617192.aspx

Thursday, 12 January 2012

How to re-index WSUS database

Monthly re-indexing of WSUS database is a recommended task to maintain its performance. You can use WsusDBMaintenance script to reindex any version of the WSUS database, SQL Server or Windows Internal Database.

If you are using Windows Internal Database for the WSUS database, you'll need to use the sqlcmd utility.

You can easily install sqlcmd util without having SQL setup media. To do this

Install MS SQL Server Native Client first
X86 Package (sqlncli.msi) - 3511 KB
X64 Package (sqlncli_x64.msi) - 6486 KB
IA64 Package (sqlncli_ia64.msi) - 8365 KB

Then install sqlcmd util to your server
X86 Package (SQLServer2005_SQLCMD.msi) - 2528 KB
X64 Package (SQLServer2005_SQLCMD_x64.msi) - 4264 KB
IA64 Package (SQLServer2005_SQLCMD_ia64.msi) - 5410 KB

Then visit http://gallery.technet.microsoft.com/scriptcenter/6f8cde49-5c52-4abd-9820-f1d270ddea61 to obtain WsusDBMaintenance script. You can easily use the copy code button and paste clipboard into a new text document then rename it to WsusDBMaintenance.sql

To run Re-index

Run the command below, my sqlcmd is located under (I used the installation method above)C:Program FilesMicrosoft SQL Server90Toolsbinn folder if you have already have it please use appropriate path. And I also chose C:Program FilesUpdate ServicesDatabase folder for my WsusDBMaintenance.sql file, it is completely up to you.

sqlcmd -I -S \.pipeMSSQL$MICROSOFT##SSEEsqlquery -i "C:Program FilesUpdate ServicesDatabaseWsusDBMaintenance.sql"

wsusdbmaintenance

 wsusdbmaintenance-2
If you get an error when you run the command please delete and type - (minus) characters by hand.

WSUS veritabanini re-indexlemek

WSUS veritabaninin re-indexlenmesi performans acisindan tavsiye edilen bir islem, bu islem icin WsusDBMaintenance scripti herhangi bir versiyon WSUS veritabanini, SQL Sunucusunu veya  Windows Internal Databasei reindexlemek icin kullanilabilir.

Eger WSUS kurulumunuzda Windows Internal Database kullaniyorsaniz sqlcmd aracina ihtiyaciniz olacak.
SQL kurulum dosyalarini edinmedende sqlcmd aracini kurabilirsiniz, bunun icin once

1. MS SQL Server Native Client (Platformunuza gore seciniz)

X86 Package (sqlncli.msi) - 3511 KB
X64 Package (sqlncli_x64.msi) - 6486 KB
IA64 Package (sqlncli_ia64.msi) - 8365 KB

2. Sonra sqlcmd aracini kurmaniz yeterli olacaktir. (Platformunuza gore seciniz)

X86 Package (SQLServer2005_SQLCMD.msi) - 2528 KB
X64 Package (SQLServer2005_SQLCMD_x64.msi) - 4264 KB
IA64 Package (SQLServer2005_SQLCMD_ia64.msi) - 5410 KB

Daha sonra http://gallery.technet.microsoft.com/scriptcenter/6f8cde49-5c52-4abd-9820-f1d270ddea61 adresinden WsusDBMaintenance scriptini edininiz. Adrese girdiginizde goreceginiz SQL kodunu copy code ile kopyalayip bos bir text dosyasi icine paste ediniz ve dosyayi WsusDBMaintenance.sql seklinde adlandiriniz.

Re-index islemi icin ise

sqlcmd -I -S \.pipeMSSQL$MICROSOFT##SSEEsqlquery -i "C:Program FilesUpdate ServicesDatabaseWsusDBMaintenance.sql"

wsusdbmaintenance
komutunu calistiriniz, burada yukaridaki paketlerle kurulum yaptigimda varsayilan klasor olan C:Program FilesMicrosoft SQL Server90Toolsbinn klasorunde yer almakta sqlcmd.exe komutu.

wsusdbmaintenance-2
Ben WsusDBMaintenance.sql icin yine mevcut olan C:Program FilesUpdate ServicesDatabase klasorunu tercih ettim bu herhangi bir klasor olabilir.

Eger kopyalayip calistirinca hata alirsaniz - (eksi) isaretlerini elle yaziniz.

WSUS icin firewall ayarları

WSUS sunucusu Microsoft Update servislerine baglanmak icin HTTP/S protokollerini yani TCP 80 , 443 portlarini kullanir, sunucunuzun bu portlardan internete ulasabildigine emin olunuz.

Ayrica firmanizda bir proxy sunucusu kullaniyorsaniz, adres tabanli kisitlamalariniz var ise veya kimlik dogrulama aktif ise asagidaki domainlere erisimi serbest birakmaniz gerekecektir.

http://windowsupdate.microsoft.com
http://*.windowsupdate.microsoft.com
https://*.windowsupdate.microsoft.com
http://*.update.microsoft.com
https://*.update.microsoft.com
http://*.windowsupdate.com
http://download.windowsupdate.com
http://download.microsoft.com
http://*.download.windowsupdate.com
http://*.stats.update.microsoft.com

Monday, 2 January 2012

WSUSSCN2.CAB Now Available for MS11-100

WSUS Team has announced : WSUSSCN2.CAB Now Available for MS11-100

Due to the urgency of the MS11-100 release on December 29, 2011, the WSUSSCN2.CAB offline catalog file was not available at the time of the MS11-100 release.

A revised WSUSSCN2.CAB offline catalog file including MS11-100 has been released and is available to support SMS 2003 ITMU, MBSA (in offline mode) and 3rd party tools that rely on this offline data source.

WSUS (3.x), SCCM, SBS, SCE and MBSA (in online and WSUS modes) were not affected as they use a direct (online) link to Microsoft.com or a local WSUS server as their data source.

http://download.windowsupdate.com/microsoftupdate/v6/wsusscan/wsusscn2.cab

MS11-100 icin WSUSSCN2.CAB hazir

WSUS Team, MS11-100'in 29 Aralik 2011 surumu icin acilen gereken WSUSSCN2.CAB cevrim disi katalogunun hazir oldugunu duyurdu, katalog MS11-100 yayimlandiginda hazir degildi.

Katalog SMS 2003 ITMU, MBSA (cevrimdisi modda) ve 3. parti urunleri deskteklemekte.

WSUS (3.x), SCCM, SBS, SCE ve MBSA (cevrimici ve WSUS modlari) urunleri bu durumdan etkilenmediler cunku bu urunler cevrimici calisiyorlar ve kataloga erisiyorlardi.

http://download.windowsupdate.com/microsoftupdate/v6/wsusscan/wsusscn2.cab

Sunday, 1 January 2012

Fix for "WARN: Could not get property (domain) for system (0x80005010)"

The Active Directory system discovery process cannot detect a client if the DNS suffix of the client differs from its DNS domain name in System Center Configuration Manager 2007 SP2

To request the hotfix from MS or to see more details : http://support.microsoft.com/kb/2345551

File Information
File nameFile versionFile sizeDateTimePlatform
Adsgdis.dll4.0.6487.215940,29601-Feb-201013:50x86
Adsource.dll4.0.6487.2159126,82401-Feb-201013:50x86
Adsysdis.dll4.0.6487.215942,34401-Feb-201013:50x86
Adsysgrp.dll4.0.6487.215940,29601-Feb-201013:50x86
Adusrdis.dll4.0.6487.215940,29601-Feb-201013:50x86