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"

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Collection with computers with Java 6 but without Update 30 installed.

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%"

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Using ConfigMgr 2012 RC2 OSD I got the bellow error (Message ID 11135):

The task sequence execution engine failed executing the action (Apply Operating System) in the group (Build the Reference Machine) with the error code 2147942402
Action output: , dwFlags, hUserToken, pszUserName, pszUserPassword), HRESULT=80070002 (e:\nts_sccm_release\sms\framework\tscore\resolvesource.cpp,3217)
ResolveSource(pszSource, sSourceDirectory, dwFlags, 0, 0, 0), HRESULT=80070002 (e:\nts_sccm_release\sms\framework\tscore\resolvesource.cpp,3122)
TS::Utility::ResolveSource( this->packageID, this->packagePath, TS::Utility::ResolveSourceFlags::PersistContents ), HRESULT=80070002 (e:\nts_sccm_release\sms\client\osdeployment\applyos\installscripted.cpp,160)
installer.install(), HRESULT=80070002 (e:\nts_sccm_release\sms\client\osdeployment\applyos\installscripted.cpp,632)
Entering ReleaseSource() for C:\_SMSTaskSequence\Packages\TST0000B
The user tries to release a source directory C:\_SMSTaskSequence\Packages\TST0000B that is either already released or we have not connected to it
InstallScripted( g_InstallPackageID, g_ImageIndex, targetVolume, g_ConfigPackageID, g_ConfigFileName ), HRESULT=80070002 (e:\nts_sccm_release\sms\client\osdeployment\applyos\applyos.cpp,493). The operating system reported error 2147942402: The system cannot find the file specified.

The problem was that for the Network Access Account I left “Use the computer account of the Configuration Manager client” in the Software Distribution Component properties. As soon as I have replaced it with a standard user account, the Task Sequence finished successfully.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

SELECT DISTINCT TOP (100) PERCENT DisplayName0, Version0, COUNT(Version0) AS Total
FROM         dbo.v_GS_ADD_REMOVE_PROGRAMS
GROUP BY DisplayName0, Version0
HAVING      (DisplayName0 LIKE ‘%Adobe Reader%’)
ORDER BY Total DESC, DisplayName0

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Recently, I wanted to install Nokia Ovi Suite to several computers in a company that started to have problems with their internet provider; it’s a third day when they do not have internet connection. So I thought it’s a good idea to show them how they can use their Nokia E72 phones to connect their laptops to internet.

Well, prior to installing Nokia Ovi Suite I had to uninstall old versions of Nokia PC Suite from 4 systems, remotely. I decided to do it using WMIC instead of ConfigMgr as the Nokia PC Suite was installed on small number of computers. After this, I can proceed with installing Ovi Suite using ConfigMgr. Till then, here is how I uninstalled PC Suite using WMIC.

  1. In a window, type Runas /user:YourUsername@UPNsuffix cmd.exe (or Runas /user:domain\username cmd.exe) where YourUsername is your domain admin username or any username with admin privileges on the remote computer and UPNsuffix is your UPN suffix. Let’s suppose I use Administrator@domain.com
  2. In the command prompt window type the password for user Administrator@domain.com and press Enter

    After entering the password your cmd window title should change to running as…

  3. Now, type WMIC

  4. Now, list all Nokia software on a specific computer using the command /node:COMPUTERNAME product where vendor="Nokia" get name, version

  5. Once we know the software name, we can uninstall specific product using the following command /node:COMPUTERNAME product where name="Nokia PC Suite" call uninstall. You will see a message like Execute (\\COMPUTERNAME\ROOT\CIMV2:Win32_Product.IdentifyingNumber="{225DB4AA-3CFF-47E8-B3C8-6DAD713E986E}",Name="Nokia PC Suite",Version="7.1.51.0")->Uninstall() (Y/N/?)?

    Type Y and wait for the result.

  6. To make sure Ovi Suite will install successful, I’m going to uninstall all Nokia software (except the runtime) using the same command just replacing the software name.

  7. Now, I can proceed and install Nokia Ovi Suite 3.1.1.78 using ConfigMgr Software Distribution method. By the way, program’s command line for silent install is Nokia_Ovi_Suite_webinstaller_ALL.exe /SILENT="1"
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

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 SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Caption like "%Windows 7%"

image image

And here is the query to create “Windows 7 computers without SP1”, you must limit this collection to “All Windows 7 computers” collection created earlier:

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_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name not in (select distinct SMS_G_System_COMPUTER_SYSTEM.Name from  SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Caption like "%Windows 7%" and SMS_G_System_OPERATING_SYSTEM.CSDVersion = "Service Pack 1")

image image

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

A customer asked me today to help him with creating some collections with client computers that do not have FEP 2010 installed so he can advertise the antivirus client to those computers. You can find the queries bellow.

All Windows 7 without Forefront Endpoint Protection 2010

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_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name not in (select distinct SMS_G_System_COMPUTER_SYSTEM.Name from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId 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.DisplayName = "Microsoft Forefront Endpoint Protection 2010") and SMS_R_System.Client = 1 and SMS_G_System_OPERATING_SYSTEM.Caption like "%Microsoft Windows 7%"

All Windows Vista without Forefront Endpoint Protection 2010

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_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name not in (select distinct SMS_G_System_COMPUTER_SYSTEM.Name from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId 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.DisplayName = "Microsoft Forefront Endpoint Protection 2010") and SMS_R_System.Client = 1 and SMS_G_System_OPERATING_SYSTEM.Caption like "%Microsoft® Windows Vista%"

Windows XP Professional SP2 without Forefront Endpoint Protection 2010

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_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name not in (select distinct SMS_G_System_COMPUTER_SYSTEM.Name from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId 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.DisplayName = "Microsoft Forefront Endpoint Protection 2010") and SMS_R_System.Client = 1 and SMS_G_System_OPERATING_SYSTEM.CSDVersion like "%Service Pack 2%" and SMS_G_System_OPERATING_SYSTEM.Caption = "Microsoft Windows XP Professional"

Windows XP Professional SP3 without Forefront Endpoint Protection 2010

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_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name not in (select distinct SMS_G_System_COMPUTER_SYSTEM.Name from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId 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.DisplayName = "Microsoft Forefront Endpoint Protection 2010") and SMS_R_System.Client = 1 and SMS_G_System_OPERATING_SYSTEM.CSDVersion like "%Service Pack 3%" and SMS_G_System_OPERATING_SYSTEM.Caption = "Microsoft Windows XP Professional"

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading ... Loading ...

Actually I just attended a local event organized by Microsoft Romania and the last session was Useful Hacker Techniques: Which Part of Hackers’ Knowledge Will Help You in Efficient IT Administration held by polish Enterprise Security MVP – Paula Januszkiewicz.

Geez… this girl presented some things that, I can bet, made half of all admins go home/work and revise their server’s security and configuration.

After seeing this presentation and demos, I will repeat what I said a couple of years ago: Romanian MVP’s still have to learn from the foreign ones! A lot!

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

While installing the latest “Forefront Client Security” product named Forefront Endpoint Protection 2010 (RC version), the prerequisites verification step displayed an error at the “Verifying restart is not required” step. And the error details: “An earlier software installation still has outstanding file rename operations pending. Before Setup can continue, you must restart the computer.”

fep_error fep_error_details

The more stranger thing happens after you restart your computer and start the Setup again. The same is displayed. Why? Well, maybe because on the FEP 2010 requirement is to have a working Configuration Manager 2007 infrastructure and almost always ConfigMgr will have open files and read/write operations on the computer you’re trying to install FEP 2010.

So, to workaround this problem you have to modify your registry (do it on your own as I did). Open PendingFileRenameOperations key from HKLM\SYSTEM\CurrentControlSet\Control\Session Manager and delete or copy its content to a notepad. Save the key and start Setup now, it should work, at least it for me.

Thanks to Evgeny-D who posted this on Microsoft’s forum. I’m glad that I did not forget Russian language Smile

1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5.00 out of 5)
Loading ... Loading ...

I had to install a copy of SQL Server 2005 on a Windows Server 2003 R2 SP2 x64. During installation I got a strange error saying that SQLncli_x64.msi file is missing. I was pretty sure that I have the same ISO file as I did while installing SQL so many times before and without any errors… Searching the net, the solution from Microsoft forum was the right one.

Before installing SQL Server, you have to download and install Microsoft SQL Server Native Client x64 file (sqlncli_x64.msi) from Microsoft Download Center.

Note: If you’re going to install Analysis Services too, then make sure to download and install Microsoft SQL Server 2005 Management Objects Collection x64 file (SQLServer2005_XMO_x64.msi) also.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...