:::: MENU ::::

How to check Windows update Agent Version

Open the %systemroot%\system32 folder.

Right-click Wuaueng.dll, and then click Properties.

Click the Details tab, and then locate the file version number

 

SQL Query to check Windows update Agent Version :-

SELECT dbo.v_R_System.Name0 AS [Machine Name], dbo.v_GS_WINDOWSUPDATEAGENTVERSIO.Version0
FROM dbo.v_R_System INNER JOIN
dbo.v_GS_WINDOWSUPDATEAGENTVERSIO ON dbo.v_R_System.ResourceID = dbo.v_GS_WINDOWSUPDATEAGENTVERSIO.ResourceID
WHERE (dbo.v_R_System.Name0 IN (‘X1,X2’))


WCM.log (system.Net.WebException: The request failed with HTTP status 503)

In SCCM Software updates synchronization not working when I check WCM.log showing as below error

system.Net.WebException: The request failed with HTTP status 503: Service Unavailable.~~   at Microsoft.UpdateServices.Administration.AdminProxy.CreateUpdateServer(Object[] args)~~   at Microsoft.UpdateServices.Administration.AdminProxy.GetUpdateServer(String serverName, Boolean useSecureConnection, Int32 portNumber)~~   at Microsoft.SystemsManagementServer.WSUS.WSUSServer.ConnectToWSUSServer(String ServerName, Boolean UseSSL, Int32 PortNumber)

Then I just removed all Proxy settings it worked for me ( Go to internet options ->conections Tab-> LAN settings-> Uncheck all boxes)

Note: open the IE with System account using psexec command

psexec -s -d -i cmd.exe :– It will open the new command prompt from here need to open the IE (C:\program Files\Internet Explorer) 


Software Updates : Colde 80244007 Windows Update ran into a problem

When you got the below error in the sccm client side, SCCM software update is not working on that machine. But however other sccm client agents like Software distribution,Inventory ,etc are working as expected

Software Updates : Colde 80244007 Windows Update ean into a problem

Software Updates : Colde 80244007 Windows Update ran into a problem

 Before going for advanced troubleshooting we can a give try of below Steps::

1. Logon in the server and open Control Panel –System and Security – Configuration Manager (32-bit) (or run%windir%\SysWOW64\CCM\SMSCFGRC.cpl)

2. In “Advanced” tab click “Configure Settings” then click “Discover” then click “Apply”.
3. Reboot server
4. Open Control Panel –System and Security – Configuration Manager (32-bit), select “Components” tab and then repair.
5. Reboot server
6. Wait for the “Run advertised programs” popup then trigger the installations
7. If no advertised programs appear:
8. Open and Administrative Command Prompt.
9. Run “DISM.exe /Online /Cleanup-image /Restorehealth”
10. Run “sfc/scannow”
11. Reboot Server
12. Open Control Panel –System and Security – Configuration Manager (32-bit)
13. Select Actions tab
14. Initiate Action for:
15. Machine Policy Retrieval & Evaluation Cycle
16. Software Updates Deployment valuation Cycle
17. Software Updates Scan Cycle

If still its not working please check whether Client is contacting correct WSUS server or not we can check in the  client registry

wsus registry location client

If it is pointing to correct WSUS but still not the issue is same , Need to install the Patch in repective WSUS server.

Most of the time, this issue will occur on windows 8 or windows server 2012  operating system .

Please download the patch from the location : KB2734608

Once you download and install this patch in WSUS server. Issue will get auto resolved

If the Error is “Code 80244007 Windows Update ran into a problem”

Please check this “https://support.microsoft.com/en-us/kb/2883201”

 

 


Hardware/Software Scan with last boot up time on specific machines – SQL Query

SELECT

v_R_System.Name0AS[Server Name],

v_GS_OPERATING_SYSTEM.Caption0AS[Operating System],

v_GS_OPERATING_SYSTEM.LastBootUpTime0AS[Last Machine Boot Up Time],

v_GS_WORKSTATION_STATUS.LastHWScanAS[Last HW Scan Date],

V_GS_LASTSOFTWARESCAN.LASTSCANDATEAS[LAST SOFTWARE SCAN DATE]

FROMv_R_SystemINNERJOINv_GS_OPERATING_SYSTEM

ONv_GS_OPERATING_SYSTEM.ResourceID=v_R_System.ResourceIDINNERJOIN

v_GS_LastSoftwareScanONv_R_System.ResourceID=v_GS_LastSoftwareScan.ResourceIDINNERJOIN

v_GS_WORKSTATION_STATUSONv_R_System.ResourceID=v_GS_WORKSTATION_STATUS.ResourceID

ANDv_R_System.Name0IN(‘Machine01’,‘Machine02’)


SQL query for “X” package DP status

SQL  query  for “X” package DP status..By using Package Name

 

 

select

SUBSTRING(dp.ServerNALPath, CHARINDEX(‘\\’, dp.ServerNALPath) + 2, CHARINDEX(‘”]’, dp.ServerNALPath) – CHARINDEX(‘\\’, dp.ServerNALPath) – 3 ) AS [Code Server Name],

dp.SiteCode,stat.SourceVersion,pstat.UpdateTime,stat.InstallStatus,

dp.PackageID,V_package.Name AS [Package Name] from v_DistributionPoint dp

left join v_PackageStatusDistPointsSumm stat on dp.ServerNALPath=stat.ServerNALPath

and dp.PackageID=stat.PackageID left join v_PackageStatus pstat on dp.ServerNALPath=pstat.PkgServer

and dp.PackageID=pstat.PackageID INNER JOIN

V_package ON V_package.packageid=dp.PackageID

where V_package.name = ‘Package Name’


Collection based on AD Group

select SMS_R_System.ResourceID,SMS_R_System.ResourceType,SMS_R_System.Name,SMS_R_System.SMSUniqueIdentifier,SMS_R_System.ResourceDomainORWorkgroup,SMS_R_System.Client from SMS_R_System where SystemGroupName = “ZZZ\\IND-XXXXX”


Collection based on Heartbeat “N” number of days

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where ((DATEDIFF(day, SMS_R_SYSTEM.AgentTime, getdate()) >=14) and AgentName = “Heartbeat Discovery”)


SCCM 2012 Roles

In order to learn the SCCM, We requires to know what are the roles available .

What is Role :– With SCCM we have many features. In-order to use those feature we requires to enable these roles. Most of the roles as similar to SCCM 2007. If something is added I’m pointing at the line

Site Servers:

Using installations with Software Media Wizard server Called as Site Server. Without Site Server You can’t install SCCM in our hierarchy. While installing Site Serve we will mention Site Server Name with 3 digit (alpha-numeric) code.It hosts the configuration manager components and services

Site System:

Once we have the Site Server, site system roles can be hosted on site server Or Installing the roles on different server. A server or server Share that hosts one or more site system roles for Configuration Manager site Manage content distribution

Site Database Server:

A site system role that runs Microsoft SQL server and hosts the configuration Manager Site Database

Management Point:

A site system role that replies to configuration Manager Client’s requests and accepts management data from configuration manager clients

Distribution Point:

A configuration manager role that stages packages for Distribution to clients

Application Catalog Website Point:

A site system role that serves as an application catalog website point

Application Catalog Web service point :

A site system role that serves as application catalog web services point

Asset Intelligence Synchronization Point :

A site system role that connects to system center online to download asset intelligence catalog information and upload uncategorized titles that can be considered for future inclusion in the catalog

Reporting services Point:

A site system role that provides integration with SQL server reporting services to create and manager reports for configuration manager

Software update point:

A site system role that runs Microsoft windows server update services and allows configuration manager to use the WSUS catalog to scan configuration manager clients for software updates

State migration Point:

A site system role that store user state and settings migrated during the Operating system deployment

Fallback Status Point:

A site system role that receives messages from ConfigMgr clients that cannot communicate with their management point

 


Central Administration Site:

A Central Administration Site (CAS) is the top level or Root level Site server in the hierarchy .CAS is dedicatedly for administration purpose. We cannot assign Clients to the CAS or we can’t manage clients with help of CAS. We can’t enable all roles in CAS.

CAS can’t support grandchild primary sites [Vertical] architecture. However, CAS can have multiple child primary sites [Horizontal]. Which they send the client data to CAS, It will stores in the SQL database which is nothing but CAS site database. In CAS we will be installing Administrator console from which we can manage our SCCM infrastructure.

Without CAS also we can install and manage the SCCM with Standalone Primary site .When we have more than one Primary site we required the CAS.

We install standalone primary site server, In future, based on business we need to expand the sites or need to add some more primaries. Then that time if we have the SCCM 2012 R2, we can install a CAS after we installed a primary site. Before SP1(service pack1),We have to install the CAS First.

CAS can support max 25 child primary sites

 

For roles supporting configuration http://technet.microsoft.com/en-in/library/gg682077.aspx#BKMK_SiteAndRoleScale

Primary SITE

Clients can assigned only to a Primary site. At least 1 Primary site requires in SCCM environment.Assigned clients data will be stored in SCCM database .Primary site can have multiple secondary sites.All these secondary will report to Primary site. Primary can be standalone or It may report CAS Site. Primary site have both Primary site client machines information and Secondary site data. Primary site requires the SCCM License

Primary site can support up to 250 secondary sites (It’s completely depends on WAN speed)

In SCCM 2007:

Not much difference but in SCCM 2007 Primary can have multiple primary sites.

 

Secondary Sites

Client won’t assign to Secondary sites .Secondary sites are always child site of the primary sites. So it managed through the console connected to parent primary site. Secondary wont requires SCCM license

Secondary site is a mediator or forwarder, it gathers the information like inventory, system status info, etc. from clients and sends to parent site. Secondary site are more useful where we have remote locations where we need links where we need to control bandwidth

In generally we used to implement on following circumstances :

Remote location has around 500+ clients

If required to use software update point

To control the Bandwidth like upward flowing traffic

In SCCM 2012 : It requires SQL database  atleast SQL server Express edition will fine. Most of the client to server data will be replicated with help of database in SCCM 2012. so they have introduced database to secondary site . Unlike in SCCM 2007 ,we have to install the secondary site from it parent site console wizard in CM 2012, at that time if database not exist , it automatically installs SQL Server Express edition

 


All SCCM Servers with Roles in a Site hierarchy – SQL Query

–Displays ServerType now with roles, not just saying remote.
SET NOCOUNT ON

select distinct sum.SiteCode,
SUBSTRING(SiteSystem, (CHARINDEX(‘\\’,sum.SiteSystem)+2), (CHARINDEX(‘\’,SiteSystem,(CHARINDEX(‘\\’,sum.SiteSystem)+2)) – (CHARINDEX(‘\\’,sum.SiteSystem)+2))) ‘Server’,
CASE Sum.Role
WHEN ‘AI Update Service Point’ THEN ‘X’ ELSE ‘ ‘
End ‘AI Point’,
CASE Sum.Role
WHEN ‘SMS Distribution Point’ THEN ‘X’ ELSE ‘ ‘
End ‘DP’,
CASE Sum.Role
WHEN ‘SMS Fallback Status Point’ THEN ‘X’ ELSE ‘ ‘
End ‘FSP’,
CASE Sum.Role
WHEN ‘SMS Management Point’ THEN ‘X’ ELSE ‘ ‘
End ‘MP’,
CASE Sum.Role
WHEN ‘SMS PXE Service Point’ THEN ‘X’ ELSE ‘ ‘
End ‘PXE’,
CASE Sum.Role
WHEN ‘SMS Server Locator Point’ THEN ‘X’ ELSE ‘ ‘
End ‘SLP’,
CASE Sum.Role
WHEN ‘SMS Site Server’ THEN ‘X’ ELSE ‘ ‘
End ‘Site Server’,
CASE Sum.Role
WHEN ‘SMS Software Update Point’ THEN ‘X’ ELSE ‘ ‘
End ‘SUP’,
CASE Sum.Role
WHEN ‘SMS SQL Server’ THEN ‘X’ ELSE ‘ ‘
End ‘SQL’,
CASE Sum.Role
WHEN ‘SMS SRS Reporting Point’ THEN ‘X’ ELSE ‘ ‘
End ‘SSRS’,
CASE Sum.Role
WHEN ‘SMS Reporting Point’ THEN ‘X’ ELSE ‘ ‘
End ‘RP’,
Sum.Role
into ##temp
from v_SiteSystemSummarizer sum
where not sum.Role = ‘SMS Component Server’

SET NOCOUNT OFF

–select * from ##temp

select distinct t1.SiteCode,t1.[Server],
(select top 1 [AI Point] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc) [AI Point],
(select top 1 [DP] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc) [DP],
(select top 1 [FSP] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc) [FSP],
(select top 1 [MP] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc) [MP],
(select top 1 [PXE] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc) [PXE],
(select top 1 [SLP] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc) [SLP],
(select top 1 [Site Server] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc) [Site Server],
(select top 1 [SUP] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc) [SUP],
(select top 1 [SQL] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc) [SQL],
(select top 1 [SSRS] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc) [SSRS],
(select top 1 [RP] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc) [RP],
CASE Site1.Type
WHEN 1 THEN ‘Secondary’
WHEN 2 Then ‘Primary’
ELSE
case when (select top 1 [AI Point] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc)=’X’ then ‘AIPoint ‘ else ” end+
case when (select top 1 [DP] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc)=’X’ then ‘DP ‘ else ” end+
case when (select top 1 [FSP] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc)=’X’ then ‘FSP ‘ else ” end+
case when (select top 1 [MP] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc)=’X’ then ‘MP ‘ else ” end+
case when (select top 1 [PXE] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc)=’X’ then ‘PXE ‘ else ” end+
case when (select top 1 [SLP] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc)=’X’ then ‘SLP ‘ else ” end+
case when (select top 1 [Site Server] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc)=’X’ then ‘SiteServer ‘ else ” end+
case when (select top 1 [SUP] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc)=’X’ then ‘SUP ‘ else ” end+
case when (select top 1 [SQL] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc)=’X’ then ‘SQL ‘ else ” end+
case when (select top 1 [SSRS] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc)=’X’ then ‘SSRS ‘ else ” end+
case when (select top 1 [RP] from ##temp t11 where t11.SiteCode=t1.SiteCode and t11.Server=t1.Server order by 1 desc)=’X’ then ‘RP ‘ else ” end
End as [ServerType],
–site1.ReportingSiteCode
(select distinct site11.ReportingSiteCode from v_Site site11
where site11.SiteCode = t1.SiteCode and site11.ReportingSiteCode is not null) as [ReportingSiteCode],
–site1.Version
(select distinct site11.Version from v_Site site11
where site11.SiteCode = t1.SiteCode and site11.Version is not null) as [Version]
from ##temp t1
left join v_Site site1 on t1.SiteCode = site1.SiteCode and t1.Server = site1.ServerName

drop table ##temp

 


SCCM report for all expired adverts

SELECT v_Advertisement.AdvertisementID AS [Advertisement ID],
v_Advertisement.AdvertisementName AS [Advertisement Name],
v_Advertisement.PackageID AS [Package ID],
v_Package.Name AS [Package Name],
v_Advertisement.ProgramName AS [Program Name],
v_Collection.CollectionID AS [Collection ID],
v_Collection.Name AS [Collection Name],
v_Advertisement.PresentTime AS [Advertisement Creation Date],
v_Advertisement.ExpirationTime AS [Advertisement Expiration Date]
FROM v_Advertisement INNER JOIN
v_Collection ON v_Advertisement.CollectionID = v_Collection.CollectionID INNER JOIN
v_Package ON v_Package.PackageID = v_Advertisement.PackageID
WHERE (v_Advertisement.ExpirationTimeEnabled = 2) AND (v_Advertisement.ExpirationTime < GETDATE()) AND (v_Advertisement.PresentTimeIsGMT = 0) OR (v_Advertisement.ExpirationTimeEnabled = 2) AND (v_Advertisement.ExpirationTime < GETUTCDATE()) AND (v_Advertisement.PresentTimeIsGMT = 1)