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….

Mother Tissue's

image

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

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

Creating a Collection Query From SQL : Collections Migration from One server to other

Creating a Collection Query From SQL : Source : http://myitforum.com/cs2/blogs/cnackers/archive/2009/04/22/creating-a-collection-query-from-sql.aspx

Credit to Dave Fuller for which this information is based upon.

Creating a collection query that is based upon SQL can be done.  It’s a little complicated, but not all that bad once you’ve done it a few times.  There are many times where you have a fantastic SQL query you would love to use, but cannot figure how to get that same query in WQL.  When you create a collection query in the administrative console, it’s created in WQL and translated to SQL.  It is possible to create a SQL query and simple update a collection with that new SQL statement to process the collection membership.

Things to understand:

What you see as the “CollectionID” in the admin console is actually the “SiteID” in the SQL database. 

The CollectionID in the SQL Database, is actually the number of the collection as it was created, so if the last collection you created was your 965th collection, it’s CollectionID in SQL would actually be 965, even though the CollectionID you see in the admin console is “ABC00012”

If you have it setup so that you can see the node information, you will see the “Store Name” ID for that collection that you can use as well.

This process involves a few steps:

1) Create a target collection with a blank query, aka don’t define anything in the query statement

2) Get the collection SiteID (as it’s referred to in SQL) otherwise known as the Collection ID in reports, or the Store Name in the node information tab in the admin console

3) Run the following query in SQL query analyzer to find the CollectionID as it’s listed in SQL

Select CollectionID, SiteID from Collections where SiteID= ‘CollectionID/StoreName as seen in the console’

This will return the CollectionID you need to update the SQL statement with

4) Run the following update command to insert your SQL statement in the SQL statement query portion of the Collection.

Update Collection_Rules_SQL
set SQL = ‘YOUR SQL STATEMENT’
where CollectionID = ‘X’

5) You can run the following query to identify that your SQL statement is in fact in the correct place now

select SQL, WQL
from Collection_Rules_SQL
where CollectionID = ‘X’

This will also show you the WQL statement for any collection you want to see.

6) Update your collection to see if you have gotten the intended results

7) I would highly recommend you make sure you SQL statement works before inserting it into the collection SQL statement

IMPORTANT NOTE: If you modify the query in the admin console, you will overwrite the SQL statement you created.  You will have to re-update the SQL statement through query analyzer if you accidentally modify the query through the console

Finding the OU of a system in SMS/ConfigMgr

SELECT     dbo.v_R_System.Name0 AS [Computer Name], A.System_OU_Name0
FROM         dbo.v_RA_System_SystemOUName AS A INNER JOIN
                          (SELECT     ResourceID, MAX(LEN(System_OU_Name0)) AS len
                            FROM          dbo.v_RA_System_SystemOUName
                            GROUP BY ResourceID) AS B ON A.ResourceID = B.ResourceID AND LEN(A.System_OU_Name0) = B.len INNER JOIN
                      dbo.v_R_System ON B.ResourceID = dbo.v_R_System.ResourceID

 

 

 

 

If you want just for one computer then…

 

SELECT     dbo.v_R_System.Name0 AS [Computer Name], A.System_OU_Name0
FROM         dbo.v_RA_System_SystemOUName AS A INNER JOIN
                          (SELECT     ResourceID, MAX(LEN(System_OU_Name0)) AS len
                            FROM          dbo.v_RA_System_SystemOUName
                            GROUP BY ResourceID) AS B ON A.ResourceID = B.ResourceID AND LEN(A.System_OU_Name0) = B.len INNER JOIN
                      dbo.v_R_System ON B.ResourceID = dbo.v_R_System.ResourceID
WHERE     (dbo.v_R_System.Name0 = 'Computer Name')

Configuration Manager R3 – Prestaged Media Setup and Walkthrough

Configuration Manager R3 – Prestaged Media Setup and Walkthrough

This blog will be a walkthrough and setup guide for Configuration Manager (ConfigMgr) R3 prestaged media.  This will cover the basic steps required in order to use the new R3 feature in your environment.

First some background on prestaged media from Microsoft:

Prestaged media is an alternative way to deploy an operating system to computers. Prestaged media is a Windows Image (.wim) file that can be installed on bare metal computers by the computer manufacturer or at an enterprise staging center. This media includes a boot image and an operating system image that an administrator can predeploy to a hard disk prior.  Prestaged media reduces network traffic and the time required to provision a computer. Prestaged media works with existing task sequences to provide a complete operating system deployment.

Prestaged media is suitable for use in environments where you would want to deploy content to a computer, but do not want to or are unable to have the computer fully provisioned, for example during the computer manufacturing process or at an enterprise staging center. Computers are distributed within the enterprise with the prestaged media already loaded. When the computer starts for the first time, the computer will boot into WinPE and connect to the Configuration Manager site management point to check for available task sequences.

NOTE: When creating prestaged media, ensure that the boot image you are using has the appropriate network and mass storage drivers need for the system to complete the provisioning process.

Creating the prestaged media image

Right click on Task Sequences and select “Create Task Sequence Media”.

image

Select “Prestaged Media”.

image

Enter any information you want added to the .wim file, then specify the location and name of the file, then click Next.

image

Take note of what you put in the Created By field because whatever you put there, will end up the name of the drive as in these examples.

image

image

You can however change the field in the image properties.  If you leave it blank, then “SCCM” will be added automatically for you. 

image

image

Next, you can select whether or not to enable unknown computer support, password protect the media, as well as the certificate options.

image

Next, we need to select the boot image and operating system you want to stage to the computer.

image

Then we have our summary before the operation begins.

image

Click Close when the process is completed.

image

Importing the prestaged image into ConfigMgr

Next we need to import our newly created .wim into ConfigMgr.

image

Browse to the path where you put the prestaged wim we previously created. Then select Next.

image

Provide properties for the image, then select Next.

image

Review the summary and then select Next.

image

Click Close when the process has completed.

image

Next you will need to distribute the image out to the distribution points. Right-click on the image and select Manage Distribution Points.  Then select “Copy the package to new distribution points”. Then select Next.

image

Select the Distribution Points you want to copy the image to, then select Next.

image

Select Next.

image

Click Close when the process completes.  You can monitor distrmgr.log to review the distribution status.

image

Creating a Task Sequence to deploy the prestaged image to a computer

Right-click on Task Sequences and select New – Task Sequence.

image

Select “Create a new custom Task Sequence”.

image

Name the Task Sequence appropriately and then select Next.

image

Select Next.

image

After the process completes successfully, click Close.

image

Ensure the Task Sequence has the appropriate boot media. You can do this by selecting Properties on the Task Sequence.

image

Ensure the boot image selected is the same one as you used when creating the Prestaged Media image.

image

Next we need to edit the Task Sequence and add the appropriate steps.

First we need to add a “Format and Partition Disk” step.

image

If you are using Bitlocker, then you’ll need to create a 100mb partition, something similar to this example.

image

image

image

If you are not using bitlocker, then you can just create a single partition.

image

image

NOTE: You do not need a Bootsect.exe command as you may have seen with other documentation.  This is unnecessary as the Format and Partition disk step takes care of this for you. 

Next we need to add a “Apply Data Image” step. Select the Prestaged media image you had previously imported.

image

image

If you are not using bitlocker, then you can leave the Destination as “next available formatted partition”.

image

If you are using bitlocker, then you need to change the Destination to match your configuration.

image

Next we need to add another “Run Command Line” step to shutdown the computer and end the Task Sequence.

image

Using a command line of “wpeutil shutdown”.

image

The finalized Task Sequence should look something like this.

image

Next if you advertise this Task Sequence to the appropriate collection, then you can run this Task Sequence on a reference machine to apply the prestaged image to that machine. (Other Task Sequences have been removed from the screenshot)

image

Configuring a Task Sequence to “finish” a prestaged image

Prestaged media is designed to work with your existing Task Sequences.  We only need to make one minor change to the “Partition Disk” step in order for Prestaged media to work successfully. We need to add a Task Sequence variable step that says _SMSTSMediaType not equals OEMmedia. This tells the Task Sequence to skip this step when using Prestaged media, so that we don’t delete the content we’ve prestaged.

image

No change is required to the Apply Operating System step as the logic already exists to detect OEMMedia.

You will however, need to configure your Destination to match whether or not you are deploying bitlocker or whatever other custom setup you may have.

If you are using bitlocker, ensure this step matches the configuration you used when applying the prestaged image to the disk.

image

If you are not using bitlocker, then just use the default configuration.

image

Executing the Task Sequence on a prestaged machine

If you power on a computer that has a prestage image applied to it, it will automatically boot the WinPE image that is staged on the machine.

image

Then we can contact the ConfigMgr server and get our policies.

image

You will see it run through the first Task Sequence steps fairly quickly.

image

After a couple minutes you’ll see the system reboot.

image

Sysprep will then run, along with whatever final configurations you have in your Task Sequence and you should find yourself with a computer joined to the domain and ready to log in within a few minutes.  In my Hyper-V lab, without any additional software applications to install, the login prompt was presented in less than 10 minutes after starting the Task Sequence.

image