Showing posts with label task sequence. Show all posts
Showing posts with label task sequence. Show all posts

Thursday, March 20, 2014

Howto: Create a Driver Package in SCCM 2012 R2

Welcome back! Today we'll discuss how to create a driver package in SCCM 2012 R2, and add it to a Task Sequence. We will discuss how to use a WMI query in the Task Sequence, to distinguish the model to get the correct driver package. This way, we prevent that the wrong drivers will be installed on a certain device!

So lets start off by opening the SCCM console, and browsing to 'Software Library'.
Then rightclick 'Driver Packages' and click on 'Create Driver Package'

 Give the driver package an appropriate name, in this case we are making a package for the DELL XPS 17.

Point it to the correct UNC path, and click on OK.

Next, we'll import the driver to SCCM. Rightclick 'Drivers', and click on 'Import Driver'.
A Wizard appears. Choose the location of where the driver resides.
Next, the wizard will show the recognized drivers.
Optionally, you can create or select a categorie. In this case, it's a Storage driver.
Next, choose the driver package where you want to add the driver(s) to. Optionally, you can check the checkbox 'Update distribution points when finished'.
You can optionally also add the driver to a boot image, and update the distibution point when the wizard finishes.
Check the details to see if everything is correct.
The drivers are being imported.
Everything went OK!
Next, you can update the driver package on the distribution point.
Accept the warning message.
Now, you can update the boot image(if needed) on the distribution point.
Follow the short wizard.



Now, you can edit the appropriate task sequence to include the driver package. First off, it's wise to retrieve the WMI information for the specific model.

1. Open a command prompt on the model (in this case a Dell XPS 17).
2. Type: WMIC Computersystem GET Model and hit enter
3. The output should be something like this:
Model
Dell System XPS L702X

Copy and paste this information to a Notepad, so that you can use it in your task sequence in a moment.

Next, rightclick the task sequence, and click Edit
Add an 'Apply Driver Package' step, in the appropriate place in the task sequence.
Give it the correct name, and choose the correct driver package.
On the Options tab, using 'Add Condition', you can add a Query WMI rule.
Paste in the following code:
SELECT * FROM Win32_ComputerSystem WHERE Model LIKE ""

Put the model you got from the WMI query you ran, between the quotation marks.

Click on Test Query. If it says that it contains valix syntax, the query should work.


Save the task sequence. Now you are ready to roll out a machine with the correct drivers!





















Tuesday, March 18, 2014

SCCM 2012: change client cache size

Today another SCCM blog!
This time it's about how to change the default cache size on the client. Normally it is 5120 MB, but in some cases, you deploy (multiple) packages which require more space.

There are several ways to change the cache size. First, you can give a parameter when installing the agent. The parameter is SMSCACHESIZE=xxxx, where xxxx is the number of MB's the new cache size will become.

Here is a detailed description from TechNet:

Specifies the size of the client cache folder in megabyte (MB) or as a percentage when used with the PERCENTDISKSPACE or PERCENTFREEDISKSPACE property. If this property is not set, the folder defaults to a maximum size of 5120 MB. The lowest value that you can specify is 1 MB.
If a new package that must be downloaded would cause the folder to exceed the maximum size, and if the folder cannot be purged to make sufficient space available, the package download fails, and the program or application will not run.
This setting is ignored when you upgrade an existing client and when the client downloads software updates.
Example: CCMSetup.exe SMSCACHESIZE=100
If you reinstall a client, you cannot use the SMSCACHESIZE or SMSCACHEFLAGS installation properties to set the cache size to be smaller than it was previously. If you try to do this, your value is ignored and the cache size is automatically set to the last size it was previously. 
For example, if you install the client with the default cache size of 5120 MB, and then reinstall the client with a cache size of 100 MB, the cache folder size on the reinstalled client is set to 5120 MB. 


However, sometimes the SMSCACHESIZE parameter doesn't work. Another way to achieve the cachesize change, is by running a VB script. You can use it in a task sequence, or deploy it as an application.

The script should look something like this:

++++changecachesize.vbs++++
On Error Resume Next
 Set oUIResource = CreateObject("UIResource.UIResourceMgr")
Set objCacheInfo = oUIResource.GetCacheInfo
 nValueToSet = wscript.arguments(0)

 objCacheInfo.TotalSize = nValueToSet


The commandline how it should be used (should be run as administrator):

EXAMPLE: changecachesize.vbs 15360

The number at the end is the size in MB the cache size will be changed to.

Ofcourse it is also possible to change the cache size in the Configuration Manager node in the Control Panel. Open the Cache tab, and change the slider to the value you like.


Hopefully this will help to prevent any problems in your Configuration Manager 2012 environment!

Friday, February 21, 2014

Monitoring Deployments in SCCM 2012 R2

 

Monitoring Deployments in SCCM 2012 R2

If you are running in to problems with your Task Sequence deployments in SCCM, it is nice to have a central view of the errors, rather than looking in the local log files of the client.

This can be achieved by using Status Message Queries.

At first you will need to get the Deployment ID of the task sequence:

Then navigate to the status message queries section in your SCCM console:

Monitoring -> Overview -> System Status -> Status Message Queries, and click Create Status Message Query.

Give your query a name (include your Task Sequence name if you like), and click 'Edit Query Statement'.


Then click on 'Show Query Language'
Copy the following Query into the Query Statement, and click OK.

Replace the site code (P01) and the Deployment ID (P012002A), in the query with your own data.
select stat.*, ins.*, att1.*, att1.AttributeTime from SMS_StatusMessage as stat left join SMS_StatMsgInsStrings as ins on stat.RecordID = ins.RecordID left join SMS_StatMsgAttributes as att1 on stat.RecordID = att1.RecordID inner join SMS_StatMsgAttributes as att2 on stat.RecordID = att2.RecordID where att2.AttributeID = 401 and att2.AttributeValue = "P01200ED" and stat.SiteCode = "P01" and att2.AttributeTime >= ##PRM:SMS_StatMsgAttributes.AttributeTime## order by att1.AttributeTime desc


 


Click OK and finish the wizard.
Now we can try and run the query.

Rightclick the query, and click on Show Messages.
You'll get a question to fill in a time span:
 




Click OK.
You should see something like this:



 
Now you can doubleclick any message to see its details.

Happy troubleshooting!