SCCM Books

Friday, December 31, 2010

OSD Task Sequence failing every Time with one or other package

If your Task sequence if keep on failing and getting some packages are missing even though you distributed them…

Solution: Check for Network account is configured and the password you types is correct….

Thursday, December 30, 2010

IBM Lenovo drivers Bad Drivers Handling in OSD

To install any IBM Lenovo drivers for Bad Drivers and softDrivers
   

We need to download the Lenovo ThinInstaller and add the required model and download the Drivers.

and set in the configuration all the drivers should set to active otherwise it gets failed

SNAGHTML12c91cd

Now create a package in SCCM for Think Installer and include a batch file to copy all the content of thininstaller to a c:\Drive and later we can run another command to delete, i.e., once we install the drivers.

Batch file:Prepare.bat

XCOPY *.* /e /s C:\

 

Note: Not required any program in SCCM, Just the package we need.

 

Task Sequence Steps:

We will have total three Steps:

1)copy the Binaries of ThinInstaller and 2) Executing/Installing the Drivers

the first step looks like below

SNAGHTML137482b

Second step looks like below:

the run command line should be :

"C:\ThinInstaller\ThinInstaller.exe" /CM -search A -action INSTALL -noicon -includerebootpackages 1,2,3,4 -noreboot -repository "\\10.30.28.10\Drivers" -log "C:\ThinInstaller\driverinstall.log"

SNAGHTML137f728

To Enter in the Apply Lenovo Drivers Step we can apply a WMI based Query :

SNAGHTML138bfd7

Note:- Under Options of these three (Including Restart Computer) no configuration required.

Task Sequence Install Multiple APPS

To install the multiple software's(Packages) based on the AD group Name. We need to have A VB script and one Database .DAT file

Create a package with the Vbscript & APP.Dat files. and the Program command line is “wscript AppAutomationv0.1.2.7.vbs”

Below is the VBScript: save as AppAutomationv0.1.2.7.vbs

'Application Automation Version 1.0.1
'AppSetup will be the base value

Dim FileGroupArray
Dim AA00
Dim strGroups, colGroups
Dim objcomputer, Currentcomputer
Dim configMgrEnv
Dim logFilename, logPath, logFile,LGText
Dim EnvGet

On Error Resume Next

Init()
'This function connects to the SMS environment and creates Log path .
'This also creates a Task sequence variable .
Function Init()

    'Get the ConfigMgr Environment
    Set configMgrEnv = createObject("Microsoft.SMS.TSEnvironment")
    'Set the log file path depending on whether the context is a Task Sequence or not
    If configMgrEnv = 0 Then
        logPath = configMgrEnv("Temp")
    Else
        logPath = configMgrEnv ("_SMSTSLogPath")
    End If   
    'Open the log file and append to it, create if it doesn't exist
    Const ForWriting = 2
    Set LGText = CreateObject("Scripting. FileSystemObject")
    Set logFile = LGText.OpenTextFile(logPath & "\" & logFilename, ForWriting,True)
End Function   

Set objcomputer = CreateObject("ADSystemInfo")
Set Currentcomputer = GetObject("LDAP://" & objcomputer.computerName)
colGroups = Currentcomputer.memberOf
If IsEmpty(colGroups) Then
   strGroups = ""
   ElseIf TypeName(colGroups) = "String" Then
      strGroups = LCase(colGroups)
   Else
      strGroups = LCase(Join(colGroups,";"))
End If

' Read a Comma Separated Text and Comparing with Group Membership
Dim PackId
Dim ProgName
Dim AppId
Dim tsVar
Const ForReading = 1
Count=1
baseVar="AppSetup00"

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("APP.dat", ForReading)

Do While objTextFile.AtEndOfStream <> True
    strLine = objTextFile.ReadLine
    If inStr(strLine, "") Then
        arrTextRecord = split(strLine, ";")
        If IsEmpty(Groups) Then
            Groups = arrTextRecord(0)
             For Each Group In colGroups
                 If LCase(Group)= LCase(arrTextRecord(0)) Then
                  tsVar = baseVar &  Count
                   AppId = arrTextRecord(1) & ":" & arrTextRecord(2)
                       If configMgrEnv <> 0 Then
                        configMgrEnv (tsVar) = AppId
                    End If      
                 Else
                 End If
            Next        
        Else
            Groups = Groups & ";"&  arrTextRecord(0)
             For Each Group In colGroups
                 If LCase(Group)= LCase(arrTextRecord(0)) Then
                    tsVar = baseVar &  Count
                       AppId = arrTextRecord(1) & ":" & arrTextRecord(2)
                       If configMgrEnv <> 0 Then
                        configMgrEnv (tsVar) = AppId
                    End If
                    Count = Count+1   
                     If Count>9 Then
                       baseVar="AppSetup0"
                     End if   
                 Else
                 End If
            Next        
        End If
       End If
Loop

WScript.Quit

 

Open Notepad and save as APP.Dat file  with below text, you should have the below format for installing the software's :

Format should be below:

distinguished name of the AD Group Name;PackageID:ProgramName

CN=Microsoft_Visio_Viewer_2010_INSTALL,OU=Software Distribution,OU=OS Deployment,OU=Win7Deployment,DC=Test,DC=com;CEN00175;Per-system unattended
CN=Microsoft_RSAT_INSTALL,OU=Software Distribution,OU=OS Deployment,OU=Win7Deployment,DC=Test,DC=com;CEN0017E;Microsoft_RSAT_Install
CN=Microsoft_Project_2007_STD_INSTALL,OU=Software Distribution,OU=OS Deployment,OU=Win7Deployment,DC=Test,DC=com;CEN00178;Microsoft_Project_2007_STD_Install

 

and below is the screenshot of the TaskSeqence Step:

We need to have two steps one for Populate the List of target apps for that system and second one for installing the apps

SNAGHTML113065f

Second Step in the TS: Install Multiple Applications

image

Note: we no need to add anything in the Options for above two steps

Wednesday, December 22, 2010

SCCM - Roger Zander Sourceforge Tools

Roger Zander Sourceforge Tools And Utilities

SMS/SCCM Peer2Peer AddOn

SMSTorrent is a Peer2Peer AddOn for SMS2003/SCCM2007 Clients. SMS/SCCM Clients are able to share the local Package cache with other Clients using the BitTorrent filesharing protocol.

http://sourceforge.net/projects/smstorrent

SMS Site Settings tweak

SMSSettings provides a GUI to modify SMS2003 (Microsoft System Management Server 2003) Site Settings which are not accessible over the normal SMS Admin Interface.

http://sourceforge.net/projects/smssettings

Screen Lock

This Tool does lock the Screen, Mouse and Keyboard for a specified time.

http://sourceforge.net/projects/screenlock

SMS Client Center

Troubleshoot and manage SMS 2003 advanced clients

http://sourceforge.net/projects/smsclictr

SMS 2003 Offline Hardware Inventory

Capture SMS2003 Hardware Inventory on Systems without Network connectivity or Systems without an SMS Agent installed. This Tool creates a DDR (DataDiscoveryRecord) and an IDMIF File for each scanned system.

http://sourceforge.net/projects/smshwinv

Secure Autologon

Enable Windows Autologon without a cleartext password in the Registry. The password will be stored by the Local Security Authority (LSA).

http://sourceforge.net/projects/autologon

SMS2003 Object Backup

Backup and restore a definable set of SMS 2003 Objects (Packages, Programs, Advertisements, Collections...). SMSObjBackup can also be used for Site Migration (Objects can be moved to another SMS Primary Site Server)

http://sourceforge.net/projects/smsobjbackup

SMS 2003 Adv.Client local policy import

A command line tool to assign local software distribution policies to an SMS 2003 Advanced Client. The Software will be installed independent of collection memberships.

http://sourceforge.net/projects/smspolimp

SMS CloneDP

Manage the assigned Software Packages of a Microsoft SMS (SystemManagementServer) 2003 DistributionPoint

http://sourceforge.net/projects/smsclonedp

SMS 2003 Software Request Web Form

SMS 2003 Software Request Web Form with a simple Workflow (mail/web based).

http://sourceforge.net/projects/smsswreq

SMS Collection Commander

Initiate SMS 2003 advanced client actions on a collection: Ping, WakeUp, HW/SW Inventory, ReRun Advertisements, Show logged on user, Download/Refresh Policy, Repair SMS Agents, Import Clients to the Collection...

http://sourceforge.net/projects/smscollctr

SMS OSD Program Import

SMSOSDXML extends the SMS 2003 Admin Console to import OSD Program-Settings based on a XML File. SMS OSD automatically creates such XML Files (SMSDeploy.xml) for each OSD Program created in the Admin Console.

http://sourceforge.net/projects/smsosdxml

SMS Package Dependency Viewer

Show "Microsoft System Management Server 2003" Software Package dependencies in a TreeView.

http://sourceforge.net/projects/smsdepview

Wednesday, December 15, 2010

Computers Bright Mail

SELECT   distinct dbo.v_R_System.Name0 AS [Computer Name], dbo.v_Add_Remove_Programs.DisplayName0 AS [Software Name],
                      dbo.v_Add_Remove_Programs.Publisher0 AS Publisher, dbo.v_Add_Remove_Programs.Version0
FROM         dbo.v_Add_Remove_Programs INNER JOIN
                      dbo.v_R_System ON dbo.v_Add_Remove_Programs.ResourceID = dbo.v_R_System.ResourceID
WHERE     dbo.v_Add_Remove_Programs.DisplayName0 like '%Bright%'

SQL Query to find the collections Hierarchy : SCCM Colleections

SQL Query to find the collections Hierarchy

 

WITH folderHierarchy (CollectionID,[Name],ParentCollectionID,[Path])
AS
(

      SELECT
            CollectionID,
            [Name],
            ParentCollectionID,
            CAST('/'+[Name]+'/' AS VARCHAR(MAX)) AS [Path]
      FROM
            (SELECT
                  CollectionID,
                  [Name],
                  ParentCollectionID
             FROM v_Collection
                  INNER JOIN v_CollectToSubCollect
                  ON v_Collection.CollectionID = v_CollectToSubCollect.SubCollectionID) AS V_1
      WHERE
            ParentCollectionID = 'COLLROOT'

    UNION ALL
   SELECT
      child.CollectionID,
      child.Name,
      child.ParentCollectionID,
      parent.[Path]+child.[Name]+'/' AS [Path]
   FROM
      (SELECT
                  CollectionID,
                  [Name],
                  ParentCollectionID
             FROM v_Collection
                  INNER JOIN v_CollectToSubCollect
                  ON v_Collection.CollectionID = v_CollectToSubCollect.SubCollectionID) AS child
      INNER JOIN folderHierarchy AS parent
         ON parent.CollectionID = child.ParentCollectionID
)
SELECT
   fldr.[Path],
   fldr.[Name],
   fldr.CollectionID

FROM
   folderHierarchy AS fldr

 

image