How install SMS Installer on a workstation


If you attempt to install SMS installer, you will get the following error.

Setup has detected that this computer is not Microsoft Systems Management Server site server. This installation can only be run on a site server.

To turn your workstation to Microsoft Systems Management Server site server, add the following registry key ;-)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Setup\TypeAnd change the "Type" Dword from 4 (Workstation) to 1 (Primary Server)Re-try the SMS installer installation.

How to create a collection of all approved clients

This collection will allow you to find machines that need approval.


For Is Approved
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_CM_RES_COLL_SMS00001 on
SMS_CM_RES_COLL_SMS00001.ResourceId = SMS_R_System.ResourceId
where SMS_CM_RES_COLL_SMS00001.IsApproved= '1'

Replace this section for not approved and unknown:
For not approved

SMS_CM_RES_COLL_SMS00001.IsApproved= '0'

For Unknown
SMS_CM_RES_COLL_SMS00001.IsApproved= '2'

I did not write this collection, I will be glade to give credit to whom ever it was :-)

How to create a collection of all non client systems

Here is a query that helps create a collection to list all the non SMS/SCCM clients.


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
SMS_R_System.Client is null OR SMS_R_System.Client = 0

Solution: OnSearchComplete - Failed to end search job. Error = 0x80072efe

Errror in WUAHandler.log:
OnSearchComplete - Failed to end search job. Error = 0x80072efe.
Scan failed with error = 0x80072efe.

Step 1: Check background programs.
=======================
Disable firewalls or other Internet browser programs that can affect the Internet connection. The following programs can affect the connection to the Windows Update site and I suggest you remove or disable them:

McAfee firewall
Norton Internet Security
Zone Alarm Firewall
Panda firewall


Step 2: Delete the CatRoot2 folder
=======================
A: Stop Cryptographic Services:

1. Click Start, click Run, type in "SERVICES.MSC" and press Enter.
2. Double click Cryptographic Services, and then click Stop (if it has been started).

B: After stopping Cryptographic Service, please delete the "Catroot2" folder:

1. Locate the "C:\Windows\System32\" folder.
2. Delete the Catroot2 subfolder in System32.

Note: I am assuming your Windows Vista is installed in C:\Windows.

C: Re-start Cryptographic Services:

1. Click Start, click Run, type in "SERVICES.MSC" and press Enter.
2. Double click Cryptographic Services, and then click Start.

Last Hardware inventory date for the systems that are assigned to a Site code

set @SMSSiteCode = (case when IsNULL(@SMSSiteCode,'')='' then '%' else @SMSSiteCode end)

SELECT DISTINCT SYS.Netbios_Name0, SYS.Operating_System_Name_and0,
  HWSCAN.LastHWScan, SWSCAN.LastScanDate, SWSCAN.LastCollectedFileScanDate, v_RA_System_SMSAssignedSites.SMS_Assigned_Sites0
FROM v_R_System SYS
LEFT JOIN v_GS_LastSoftwareScan SWSCAN on SYS.ResourceID = SWSCAN.ResourceID
LEFT JOIN v_GS_WORKSTATION_STATUS HWSCAN on SYS.ResourceID = HWSCAN.ResourceID left join v_RA_System_SMSAssignedSites on v_RA_System_SMSAssignedSites.ResourceID = SYS.ResourceID where v_RA_System_SMSAssignedSites.SMS_Assigned_Sites0 like @SMSSiteCode
Create a prompt with a variable name - SMSsitecode

begin
if (@__filterwildcard = '')
  select distinct SMS_Assigned_Sites0 as SMSSiteCode From v_RA_System_SMSAssignedSites
else
  select distinct SMS_Assigned_Sites0 as SMSSiteCode  from v_RA_System_SMSAssignedSites
    where ((SMS_Assigned_Sites0 like @__filterwildcard))
    order by SMS_Assigned_Sites0
end

ConfigMgr Report to show available Hard Drive space on machines with its client version

select
v_R_System.Name0, client_version0,v_GS_LOGICAL_DISK.Name0 as Drive,
v_GS_LOGICAL_DISK.Size0 as Size,
v_GS_LOGICAL_DISk.FreeSpace0 as FreeSpace, size0 as Used
from
v_R_System inner join v_GS_LOGICAL_DISK on v_R_System
.ResourceID = v_GS_LOGICAL_DISK.ResourceID inner join v_FullCollectionMembership on v_FullCollectionMembership.ResourceID=v_R_System
.ResourceID
where
v_GS_LOGICAL_DISK.DriveType0 = 3 and v_FullCollectionMembership.CollectionID = @CollectionID
order
by FreeSpace
Create a prompt Query with a variable “CollectionID”

select CollectionID,Name from v_Collection

ConfigMgr SQL query to list hardware and add/remove programs inventory for a client

It lists NetBIOS Name, Install Site Code, processor Name, Processor Manufacturer, Model, Total Physical Memory, and Serial Number for a selected client.
It also lists the add remove programs inventory for a client.

SQL Query:
SELECT V_R_SYSTEM.Name0,v_RA_System_SMSInstalledSites.SMS_Installed_Sites0,v_GS_PROCESSOR.Name0,v_GS_COMPUTER_SYSTEM.Manufacturer0,v_GS_COMPUTER_SYSTEM.Model0,v_GS_COMPUTER_SYSTEM.Name0,v_GS_X86_PC_MEMORY.TotalPhysicalMemory0,v_GS_PC_BIOS.SerialNumber0 from v_r_system inner join v_GS_PROCESSOR on v_R_system.ResourceID=v_GS_PROCESSOR.ResourceID inner join v_GS_COMPUTER_SYSTEM on v_GS_COMPUTER_SYSTEM.ResourceID=v_r_system.ResourceID inner join v_GS_X86_PC_MEMORY on v_GS_X86_PC_MEMORY.ResourceID=v_r_system.ResourceID inner join v_RA_System_SMSInstalledSites on v_RA_System_SMSInstalledSites.ResourceID=v_r_system.ResourceID inner join v_GS_PC_BIOS on v_GS_PC_BIOS.ResourceID=V_r_system.ResourceID where v_r_system.Name0 like @computername

Select v_Add_Remove_Programs.DisplayName0, v_Add_Remove_Programs.Publisher0, v_Add_Remove_Programs.Version0
FROM v_Add_Remove_Programs
JOIN  v_R_System ON v_Add_Remove_Programs.ResourceID = v_R_System.ResourceID
WHERE v_R_System.Netbios_Name0 = @computername

Prompt Query:

Create a prompt with a variable “computername” using the following query.

begin
 if (@__filterwildcard = '')
  SELECT DISTINCT SYS.Netbios_Name0 from v_R_System SYS WHERE SYS.Client0=1 ORDER By SYS.Netbios_Name0
 else
  SELECT DISTINCT SYS.Netbios_Name0 from v_R_System SYS WHERE SYS.Client0=1
  and SYS.Netbios_Name0 like @__filterwildcard
  ORDER By SYS.Netbios_Name0
end