Count: SELECT [ProductModel], COUNT(1) CNT FROM [AdventureWorks2017].[Production].[vProductAndDescription] GROUP BY [ProductModel] ORDER BY CNT DESC Count "if": SELECT [ProductModel], [Name],COUNT(1) CNT FROM [AdventureWorks2017].[Production].[vProductAndDescription] WHERE [ProductModel] LIKE '%Frame' AND [Name] LIKE '%52' --here's the IF statement GROUP BY [ProductModel], [Name] ORDER BY CNT DESC Count duplicates: SELECT [ProductModel], COUNT(1) CNT -- select a field you want to … Continue reading Examples of Count, Count IF, Count duplicates in SQL
Error: Trying to install .NET Framework 3.5 Features on a Windows Server 2016, either through GUI or PowerShell, returns below error (truncated): "The request to add or remove features on the specified server failed. Installation of one or more roles, role services, or features failed. The source files could not be found." Cause: .Net Framework … Continue reading Install-WindowsFeature Web-Net-Ext failed. Source files could not be found.
Symptoms Did your SMS_OBJECT_REPLICATION_MANAGER component shows a lot or 6004 MessageIDs with the following description: “Object Replication Manager failed to process Object changes. These changes will be retried on next processing cycle.”? Cause By design, maybe. Resolution Run the following query in SQL Management Studio (Warning! modifying the database directly may not be supported by … Continue reading Object Replication Manager failed to process Object changes.
Steps to perform on primary domain controller (DC) Extend AD schema Log in using a domain admin account Insert ConfigMgr 2012 SP1 DVD Open a command prompt window Type D:\SMSSETUP\BIN\X64\EXTADSCH.EXE and press Enter. Wait for a confirmation message in CMD window and then check for the existence of ExtADSch.log file in the root of C: … Continue reading Step-by-step guide to install Configuration Manager 2012 SP1 R2
Symptoms You make changes to a package and update your distribution points. Shortly you receive error messages in Component Status for SMS_DESPOOLER component. Status message details is similar to the following: Cause The destination drive where site server is uncompressing the package is full. Resolution If you don’t know the drive where the package is … Continue reading Despooler failed to merge delta to the compressed package. Error 112.
IF you during deployment you want to easily uncheck “Install new versions automatically” feature, there is a registry setting you can configure prior to actual IE setup.exe or msi, whatever you use. Copy the following text to a notepad and save it as a REG file. Then use REG IMPORT “Disable_AutoUpdate.reg” before you deploy your … Continue reading Uncheck “Install new versions automatically” in Internet Explorer 10 during deployment
Create a CMD file with the following content @echo off :: - - - - - Check if KB is installed - - - - - - - - systeminfo | findstr 2823324 :: - - - - - If not installed (1), exit - - - - - - - IF %errorlevel% EQU 1 … Continue reading Uninstall KB 2823324 using ConfigMgr
First, if you want your query to display the right information, you must have a collection with all Windows 7 computers, regardless of the service pack version installed. Here is the simplest query to create “All Windows 7 computers” collection (please make this collection “Not collection limited”): 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 inner join SMS_G_System_OPERATING_SYSTEM on … Continue reading Collection with Windows 7 computers without SP1
WMI queries to find 64 and 32 bit computers: SELECT * FROM Win32_OperatingSystem WHERE OSArchitecture = "64-bit" SELECT * FROM Win32_OperatingSystem WHERE OSArchitecture = "32-bit"
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 inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.Version < "6.0.300" and SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "Java(TM) 6%"