Показаны сообщения с ярлыком WSUS. Показать все сообщения
Показаны сообщения с ярлыком WSUS. Показать все сообщения

2011/05/24

WSUS issue: directory permissions and shares disappeared

CURRENT CONFIGURATION: Windows 2003 R2 x64 SP2, WSUS 3.0 SP1 and remote MS SQL 2005 server
OBJECTIVE: Fix issue with WSUS directory permissions and shares.
ISSUE: WSUS folder content was restored to the same location D:\WSUS but with folder and share permissions issue. WSUS shares were disappeared after server restart. 
Server Event ID: 10012 The permissions on directory D:\ are incorrect. 
Clients logs:
80070005    AutomaticUpdates    Failure    Content Download    Error: Download failed.
SOLUTION: 
Use \Program Files\Update Services\Tools\wsusutil.exe
Create new empty folder WSUS2
Run next commands.
"C:\Program Files\Update Services\Tools\wsusutil.exe" movecontent D:\WSUS2 d:\move.log -skipcopy
"C:\Program Files\Update Services\Tools\wsusutil.exe" movecontent D:\WSUS d:\move2.log -skipcopy
It would takes a while.
move2.log:
Successfully stopped WsusService.
Beginning content file location change to D:\WSUS
Did not copy files due to -skipcopy flag.
Successfully changed WUS configuration.
Successfully changed IIS virtual directory path.
Successfully removed existing local content network shares.
Successfully created local content network shares.
Successfully changed registry value for content store directory.
Successfully changed content file location.
Successfully started WsusService.
Content integrity check and repair...
Initiated content integrity check and repair.
Check WSUS status
"C:\Program Files\Update Services\Tools\wsusutil.exe" checkhealth
Done. Please check event log for events with source "Windows Server Update Services".

2009/12/23

Delete the WSUS Client ID's from registry by Powershell script

CURRENT CONFIGURATION: Microsoft Windows 2003 with Powershell 1.0; WSUS 3; OS distribution method is cloning (imaging) of computers or virtual machines copying.
OBJECTIVE: Fix the issue with computer name overlapping in WSUS
ISSUE: Computers override each other or not appear in WSUS console.
SOLUTION: When you clone (re-image) new computer from different either disk or clone image WSUS Client ID would be the same for either both or all recloned (reimaged) computers.
I wrote Powershell script to delete WSUS client ID's in registry.
DeleteWSUSid.ps1
# *****************************************************************************
# Windows Powershell script
# Author:  Vadim Zenin http://vadimszenins.blogspot.com
# Version:  1.00
# Date:     27/11/2009 13:47:06
# Purpose: Delete the WSUS Client ID's from the registry.
#
# Do not forget: Set-ExecutionPolicy RemoteSigned
#
# Arguments:
#
# Tested platform:
# Windows Powershell v 1.0,
# Windows 2003 R2 x64 SP2
#
# Version 1.00 revision:
#
# This code is made available as is, without warranty of any kind. The entire
# risk of the use or the results from the use of this code remains with the user.
# *****************************************************************************

Param(
)

# Require
# =============================================================================

# =============================================================================
# Function that returns true if the incoming argument is a help request
# =============================================================================
function IsHelpRequest
{
    param($argument)
    return ($argument -eq "-?" -or $argument -eq "-help");
}

# =============================================================================
# Function: Get-Usage
# Author: Vadim Zenin
# Created: 30/10/2009 13:01:21
# Purpose: Script usage explanation and examples.
# Arguments: none
# Returns:
# =============================================================================
function Get-Usage()
{
@"

USAGE:

NAME:
$ScriptNameOnly.ps1

SYNOPSIS:
Delete the WSUS Client ID's from the registry.

PARAMETERS:

EXAMPLES:
.\$ScriptNameOnly.ps1

"@
}

# =============================================================================
#  MAIN SCRIPT
# =============================================================================

$ScriptPath = $MyInvocation.MyCommand.Path
$ScriptNameOnly = [system.io.path]::GetFilenameWithoutExtension($ScriptPath)
#write-host " ScriptNameOnly: $ScriptNameOnly"

# Check for Usage Statement Request
$args | foreach { if (IsHelpRequest $_) { Get-Usage; exit; } }

write-host "Deleting the WSUS Client ID's from the registry"
$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate"
$RegProperties = "AccountDomainSid", "PingID", "SusClientId", "SusClientIdValidation"
foreach ($RegProperty in $RegProperties) {
    remove-itemproperty -path $RegPath -name $RegProperty -erroraction silentlycontinue
}
#Get-ItemProperty $RegPath

Write-Host -ForegroundColor DarkGreen " Script $ScriptNameOnly has finished"
Download md5: 1bdfcbd25c3b78d204110ace9d89bb8e

2008/11/26

Delete the WSUS Client ID's from registry by Logon script

CURRENT CONFIGURATION: Windows XP, 2003; WSUS 3; OS distribution method is cloning (imaging) of computers.
OBJECTIVE: Update all workstation and server trough WSUS
ISSUE: Computers override each other or not appear in WSUS console.
SOLUTION: When you clone (reimage) new computer from different either disk or clone image WSUS Client ID would be the same for either both or all recloned (reimaged) computers.
I've chosen VBS Login script approach to delete WSUS client ID's in registry.
The new WSUS ID's would be generated at "Automatic Updates" service start.
The computer would connect to WSUS server.
Please change MyCompanyName and MyDivisionName.
--- Start of code ---
'******************************************************************************
'   Author:  Vadims Zenins http://vadimszenins.blogspot.com
'   Version: 1.01
'   Date:    26/11/2009 18:18:44
'   Subroutine DeleteWSUSid
'   delete the WSUS Client ID's from the registry
'   and Restart service "Automatic Updates
'   Inputs - none
'   Call DeleteWSUSid()
'   WshShell.run "wuauclt.exe /resetauthorization /detectnow", 0, True
'******************************************************************************
Sub DeleteWSUSid()
  On Error resume next
' Stop service "Automatic Updates"
WshShell.run "net.exe stop wuauserv", 0, True

'Set the registry keypath that we are going to work with
strKeyPath = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate"
'Set the value name that we will use to create the registry marker
' (to determine if we've run the script before on this computer)
strKeyReportPath = "HKLM\SOFTWARE\MyCompanyName\MyDivisionName"
intValue = 1

If WSHShell.RegRead(strKeyReportPath & "\WSUSIDDeleted") <> "1" Then
strMessage = "Deleting WSUS IDs in registry: " & strKeyPath
'Show me a box for 3 sec.
WshShell.Popup strMessage,3
'Delete registry values
'strMessage =  "Deleting " & strKeyPath & "\AccountDomainSid"
'WshShell.Popup strMessage,2
WSHShell.RegDelete strKeyPath & "\AccountDomainSid"
'strMessage =  "Deleting " & strKeyPath & "\PingID"
'WshShell.Popup strMessage,2
WSHShell.RegDelete strKeyPath & "\PingID"
'strMessage =  "Deleting " & strKeyPath & "\SusClientId"
'WshShell.Popup strMessage,2
WSHShell.RegDelete strKeyPath & "\SusClientId"
'strMessage =  "Deleting " & strKeyPath & "\SusClientId"
'WshShell.Popup strMessage,2
WSHShell.RegDelete strKeyPath & "\SusClientIdValidation"

'Create Key in registry for report
WSHShell.RegWrite strKeyReportPath & "\WSUSIDDeleted", intValue, "REG_DWORD"
WSHShell.RegWrite strKeyReportPath & "\WSUSIDDeletedDate",Now

Wscript.Sleep 2000
' Start service "Automatic Updates"
WshShell.run "net.exe start wuauserv", 0, True

Else
End If

End Sub
'******************************************************************************

--- End of code ---

Download md5: 12d50a1db2af39c1a68884a107fccc43
LINKS: Delete the WSUS Client ID's from registry by Powershell script

2008/10/01

WSUS 3 SP1 and remote MS SQL Database with nonstandard IP port

CURRENT CONFIGURATION: Windows 2003 R2 x64 SP2, WSUS 3.0 SP1 and remote MS SQL 2005 server with non standard IP port.

OBJECTIVE: Connect to WSUS administration console.

ISSUE: WSUS administration console responds: Cannot connect to 'yourWSUSserverName'. SQL server may not be running on the server. Please verify that SQL Server is running and configured correctly on the server.
Application Event ID: 7032
The WSUS administration console was unable to connect to the WSUS Server via the remote API.
Verify that the Update Services service, IIS and SQL are running on the server. If the problem persists, try restarting IIS, SQL, and the Update Services Service.
The WSUS administration console has encountered an unexpected error. This may be a transient error; try restarting the administration console. If this error persists,
Try removing the persisted preferences for the console by deleting the wsus file under %appdata%\Microsoft\MMC\.


SOLUTION:
Just in case delete the files under %appdata%\Microsoft\MMC\
Check YourSqlServerName in registry "HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup\SqlServerName"
Try connect to SQL server with command:
sqlcmd -S YourSqlServerName,IPport -E -d SUSDB
If you connected successful change value of registry "HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup\SqlServerName" to YourSqlServerName,IPport
Restart WsusService
Try open the
WSUS administration console.

Links: Troubleshooting database issues
TAGS: wsus, MSSQL, SQL server, WSUS remote database