Tuesday, January 04, 2011

SCCM Collection based on 'File' and version less than "X"

The below System query shows "X.exe" file with anything less than version "X.x.x.x.". Very useful for discovering out of date files and creating and advertisement to install the correct version

Make sure you have your file inventory configured correctly.


SELECT        VRS.ResourceID, VRS.ResourceType, VRS.Name0

FROM            dbo.v_R_System AS VRS INNER JOIN
                         dbo.v_GS_SoftwareFile AS SF ON VRS.ResourceID = SF.ResourceID

 WHERE        SF.FileName = 'X.exe' AND SF.FileVersion <= 'x.x.x.x'
Please note i've used 'less than or equal to' in the above query if you want just less than remove the '='

Also a different way to do the same. Create 2 queries

http://www.sccm-tools.com/tools/wqlqueries/WQLQueries-Colcompswithfile.html

Thursday, November 25, 2010

VB Script to run gpupdate.exe /force silently without a reboot

If you use Gpupdate.exe /force in your logon scripts ypu would've of found by now that sometimes if not most often when running gpupdate.exe you are asked to either logoff or reboot to apply configuration settings. You've also probably found that there is no exact command like 'Gpupdate.exe /Force /Silent.'

The below VBscript below will run Gpupdate.exe /force without any user interaction it will also not show any log off or reboot requests.

To implement this in a logon script place the code below into its own SilentGPupdate.vbs file. Then call it from your logon script, I've set the WshShell.Run not to wait to finish each command because gpupdate.exe can run in its own space and time (doing this will keep your login times quick).

===============
'VB Script for Refreshing GroupPolicy Settings silently
'Script Version: 0.2
'Created: 25/11/2010
'Created By: Joejoeinc.com

'Define Variables and Objects.
Set WshShell = CreateObject("Wscript.Shell")

'Note: Gpupdate command has to be run twice as the ECHO command can't answer more than one question.

'Refresh the USER policies and also answer no to logoff if asked.
Result = WshShell.Run("cmd /c echo n | gpupdate /target:user /force",0,true)

'Refresh the Computer policies and answer no to reboot.
Result = WshShell.Run("cmd /c echo n | gpupdate /target:computer /force",0,true)

'Hand back the errorlevel
Wscript.Quit(Result)
===============

Props to Craig for pointing out that if you name the script gpupdate.vbs you will cause a loop.

Wednesday, November 24, 2010

General BITS troubleshooting

Iboyd has a great writeup on how and where to check various BITS settings in SCCM.

http://iboyd.net/index.php/2009/01/09/troubleshooting-sccm-and-bits-downloads/

One line in his post rings very true
"With BITS, you have to remember that, in simple terms, you’re downloading files from an over-glorified website. That means that your file transfers are dependent on the IIS instance running on the distribution point."

Tuesday, October 05, 2010

What does this advertisement status message mean?

Bredban of the "Random helpful stuff that I have found along the way" blog has kindly posted information of the what the various status messages mean in your SCCM advertisements.

http://blogs.technet.com/b/breben/archive/2010/09/30/what-does-this-advertisement-status-message-mean.asp"

Friday, September 17, 2010

DNS Alias doesn't work when pointed to a 2008 server

Say you replace a  server and just want to use an DNS alias to keep the original name of the service. When you try this on windows 2008 it may not work because of 'Strict Name Checking' that is enabled in the system registry of the Windows 2008 server you are trying to access.

We found that
1.HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters


2. On the Edit menu, click Add Value, and then add the following registry value:

Value name: DisableStrictNameChecking
Data type: REG_DWORD
Radix: Decimal
Value: 1
Then rebooting the server fixed the issue. 

I know this link looks to be only for Windows 2000 and or 2003 but I found it also effective for Windows 2008
http://support.microsoft.com/?id=281308