Thursday, April 15, 2010

How To Check If A BITS Enabled Distribution Point Is Up And Running like how we check MP

To check if a Management Point is up and running we have the mplist and mpcert http URLs that we can open in Internet Explorer.  We don’t have such URLs to test if a Distribution Point (DP) is up. Management Point and Distribution Point servers are very different roles.  The Management Point is a conduit for the clients to get information from the SQL database i.e. their cert, their machine policy, etc.  That is why there is a way to use an http link to get that information from SQL through the MP.  A DP is nothing but a server share.  To use BITS for downloads, we expose that share through a virtual IIS directory.

clip_image002

There is no http link with a cert on a DP that we can query on, but you can create a package just to test the DP health.  Here is how:

1. Create a text file and write in it whatever you want to see when you use the http URL to test the DP.

2. Rename that file and change the txt extension to html.

3. Create a package that only contains that file and add your distribution points to the package.

4. Get the package ID and then go to the IIS Manager console and find the name of the DP virtual directory and make sure there is a folder for your DP health package.

5. Use IE and type the URL for the server, the virtual IIS directory, the package ID folder, and then your html file.  In my case it looks like this:

http://sccm/sms_dp_smspkge$/zzz0002e/dphealth.html

6. You should get back the content of the text file you created on step one:

clip_image004

If you get the content of your html file back, your BITS enabled DP is up.

During OSD, format first partition only

Our helpdesk asked me to make a task sequence that can be used on computers with more than one partition. In this case, I had to make sure that the operating system will install only on first partition and will not touch the data on other partitions.

To achieve this, I copied another TS and modified the following 2 steps:

  • removed any “Format and Partition Disk” step
  • in the “Apply Operating System Image” step, under “Select the location where you want to apply this operating system” made the following modifications:
    • Destination: Specific disk and partition
    • Disk: 0 (if all computers are installed on first hard disk)
    • Partition: 1 (if all computers have OS installed on first partition)

This way, when TS runs, it automatically wipes partition 1 from disk 0 and will not touch any other partition or disk.

Wiping volume C:\

 

 

=============================================================================================

Detailed steps are below…for dummies
Format and Partition Disk:

In SCCM console navigate to Computer Management, Operating System Deployment, Task Sequences. Suppose you already created or imported a new Microsoft Deployment Task Sequence. If not, do it now.

  • Select the desired Task Sequence and click Edit in the Actions pane

  • In the <Name> Task Sequence Editor window, in the left pane select Format and Partition Disk

TS-Properties

  • Click the yellow star to add a new partition
  • In the Partition name type the name of your system partition, this will be you disk C:
  • Under Partition options, select the Partition type as Primary
  • Choose how you want to set partition size, use a percentage of all hard disk drive or a fixed value. I use 50% of the HDD size, because not every time I know what HDD size new laptops/PCs will have but for sure it will be more than 80GB
  • Check the box to make this partition bootable
  • Under Formatting options, choose the file system you want and check the Quick format checkbox (optional) to save time during installation
  • Under Advanced options write a Variable name
  • Click OK when you’re done making your changes

TS 1st Partition properties

Now you’ll see this volume in the task sequence editor.

TS Properties

To add another partition click the yellow star again and fill in the following details:

  • In the Partition name type the name of your partition, this will be you disk D:

  • Under Partition options, select the Partition type as Primary

  • To use all the remaining disk space, select “Use a percentage of remaining free space” and set the Size(%) to 100

  • Under Formatting options, choose the file system you want and check the Quick format checkbox (optional)

  • Under Advanced options write a Variable name

  • Click OK when you’re done making your changes

clip_image008

Now you’ll see both volumes in your task sequence editor window. Next time you will deploy an operating system, the hard disk will format and create 2 partitions (C: and D:) and your computer will boot from the first partition (C:).

TS 2nd Partition properties

How does SCCM know that it needs to apply the OS image on the first partition and not the second? Well, it doesn’t, we will set this up in the “Apply Operating System Image” task.

Apply Operating System Image:

In SCCM console navigate to Computer Management, Operating System Deployment, Task Sequences.

  • Select the desired Task Sequence and click Edit in the Actions pane

  • In the <Name> Task Sequence Editor window, in the left pane select Apply Operating System Image

  • If you are installing the OS using the source media, then choose “Apply operating system from an original installation source” option using Browse choose one of the installation packages you have created when making the task sequence

  • If you have captured and OS image previously as a .wim file, you can select “Apply operating system from a captured image” option and select the image you want

  • Check to use a sysprep answer file and select the package using the Browse button

    • Now is the time to tell SCCM where you want your image to be applied.

              - To apply the image on a specific partition, under Destination select “Specific disk and partition”. Under Disk select 0 (zero) and under Partition select 1 (first partition). This is the option I use every time
              - To apply the image on the C: partition, under Destination select “Specific logical drive letter”. Under Disk letter select C:

    Format and Partition Disk

    This is it about these two tasks. Of course these tasks can be further customized using the Option tab of each task.

  • to find out linked report ID in all reports

    SELECT     TOP (100) PERCENT ReportID, Name, Category, DrillThroughReportID
    FROM       dbo.v_Report
    WHERE      (NOT (DrillThroughReportID IS NULL))
    ORDER BY   ReportID

    Upgrade Configuration Manager client from SMS 2003

    • Create a report that counts all client versions. (This is optional, just for information purposes).
      Report query is:

      SELECT TOP (100) PERCENT Client_Version0 AS [ConfigMgr client version], COUNT(Client_Version0) AS Total
      FROM dbo.v_R_System GROUP BY Client_Version0, Client0 HAVING (Client0 = 1)
      ORDER BY Total DESC, [ConfigMgr client version]

    • Create a collection (“Older Clients” for example) with all system resources with a client version not 4.00.6487.2000.
      Collection query is:

      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.ClientVersion != "4.00.6487.2000"

      This way, system resources with older client version will be members of this collection.

    • Created a package and program with ConfigMgr client upgrade with custom command line parameters.
      Program command line is:

      CCMSETUP.EXE /noservice SMSSITECODE=CFM SMSCACHESIZE=1024 SMSSLP=CFM.DOMAIN.COM SMSMP=CFM.DOMAIN.COM RESETKEYINFORMATION=TRUE

    • Advertised it to “Older Clients” collection.

    Now, as system resources with older client version are members of this collection they will receive the advertisement and will silently install the latest ConfigMgr client.

    When the collection will have no system resources, I will know that all clients are upgraded. Also, I can check this by opening the same report from any browser on any computer.

    How to create a Windows Image (.wim) file

    Method one:- With SCCM build and capture

    Method two : WDS capture Wizard

    method three: details steps are below

    Depending on what you need the .wim file for, you can create it manually or automatically.

    - To manually create a .wim file (capture image) you need a bootable CD with Windows PE (with ImageX.exe included) that you can create using Windows Automated Installation Kit.

    The basics steps are:

    1. Boot your computer using Windows PE disk.
    2. In the Windows PE command prompt navigate to the folder with ImageX.
    3. To capture the C: partition, use the following example:
      imagex.exe /capture C: D:\CapturedImage.wim “My captured image”

      Where: C: is the partition to be captured; D:\CapturedImage.wim is the place of the captured file; “My captured image” is the name of the file.
      More switches can be found on the ImageX Command-Line Options page.

    If you need the image for deployment, do not forget to run sysprep before capturing the image!

    - To automatically create a .wim file you can use a capture media created using Configuration Manager.

    If you want to capture a Windows XP OS, copy sysprep files to C:\sysprep. Newer operating systems have sysprep files installed by default.

    To use capture media:

    1. Insert the CD into your CD/DVD drive and shortly autoplay will open Image Capture Wizard.
    2. Clicking Next will show you Image Destination page. Select where to save the wim file.
    3. On the next page enter some information about the image.
    4. On the Summary page click Finish. The task sequence will start sysprep and restart the computer. After restart, the computer will boot to Windows PE and will capture a image of the machine.

    Deploy Office 2007 SP2 with ConfigMgr 2007

    As Microsoft recently released Service Pack 2 for Office 2007 suite, it is a good idea to add the update files to the package so it it can be deploy during the installation.

    So, first of all we have to download the SP2 executable file from here: http://www.microsoft.com/downloads/details.aspx?FamilyID=b444bf18-79ea-46c6-8a81-9db49b4ab6e5&displaylang=en (see additional information bellow).

    Then, using a command prompt window, extract the content of the package to a folder you can browse to.

    Extract (Click the image for a larger view)

    Accept EULA and click Continue.

    image

    Select a folder to extract the files to.

    Browse For File

    When the extraction is complete, you should have the following files:

    Folder Structure

    At this point, you can delete the office2007sp2-kb953195-fullfile-en-us.exe file. Copy the other 9 files to “Updates” folder from your Office 2007 source folder.

    Updates folder

    Now you only have to update the distribution point/s and the next time Office 2007 will install, it will apply the SP2 update during Office 2007 installation.

    Applying Updates

    The same steps are valid for Visio and Project 2007.

    Microsoft Office Visio 2007 Service Pack 2 (SP2) can be downloaded from here: http://www.microsoft.com/downloads/details.aspx?familyid=78E36742-8BDA-471E-88E6-9B561BB06258&displaylang=en.
    Microsoft Office Project 2007 Service Pack 2 (SP2) can be downloaded from here: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=c126fa4a-b43f-4f7e-a9d4-522e92a6cfee.

    Install drivers by computer model using WMI query

    When using task sequence, you might want to install different driver packages for different computer models. This can be accomplished by using a WMI query.

    First of all you need to have driver packages for all your computer models and know the exact model name for every computer.

    To find this, open a command prompt and type WMIC ComputerSystem GET Model (use this command on every computer to find it’s model).

    Then, Edit your task sequence. Add how many steps you need with “Apply Driver Package”. Select the driver package you have created for a certain computer model (HP dc5700 in my case).

    Apply Driver Package

    In the Options tab, click Add Condition and select Query WMI. In the WMI Query Properties window, make you sure you have root\cimv2 as WMI Namespace and write the following query in the WMI Query input box:

    SELECT * FROM Win32_ComputerSystem WHERE Model LIKE “%dc5700%” for HP Compaq dc5700 computer models.

    WMI Query

    Now, for every driver package, replace the model name with the computer model name the driver package is for. This way, the task sequence will install the correct drivers on every computer that will match the model specified in the query and will skip other steps sending the following status message: “The task sequence execution engine skipped the action (HP Compaq dc5700) in the group (Apply driver packages) because the condition was evaluated to be false”.