Monday, January 12, 2009

SCCM Client SUP registry Value Check Script

To find SCCM Client have the SUP server Registry key value status
 
This script will check Weather the Client system is scanning properly with SUP server or not
============================================================================================================================================================================================================================================================
On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
Set Fso = CreateObject("Scripting.FileSystemObject")
Set InputFile = fso.OpenTextFile("MachineList.Txt")
Do While Not (InputFile.atEndOfStream)
strComputer = InputFile.ReadLine
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"
strValueName = "WUServer"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
If IsNull(dwValue) Then
    Wscript.Echo "The registry key does not exist. (" & dwValue & ") and computer name" & StrComputer
Else
    Wscript.Echo "The registry key exists. (" & dwValue & ") and computer name" & StrComputer
End If
Loop
''''HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
 
============================================================================================================================================================================================================================================================

-------------------
Thanks,
http://sccm07.blogspot.com/

No comments: