Showing posts with label 2012. Show all posts
Showing posts with label 2012. Show all posts

Tuesday, March 18, 2014

Howto: Create a device collection based on manufacturer in SCCM 2012

In this blog we'll discuss how to create a device collection in SCCM based on a device manufacturer.
This can be usefull when targeting hardware specific applications for instance.

First off, we'll need to get the manufacturer as it is noted in WMI. In our example, we used an ASUS.

The command you can run in the command prompt is:

wmic computersystem get manufacturer

 As you can see the return value is : ASUSTek COMPUTER INC.
 Next, we'll create a new device collection in the SCCM Console.
 Give it an appropriate name and optionally comment it. Choose 'All Systems' as the limiting collection. Click Next.
 Choose for 'Add Rule' and click on 'Query Rule'.
 Give the query a recognizable name, and click on 'Edit Query Statement...'
 Go to the Criteria tab, and click on 'Show Query Language'.
 Paste in the following code:

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 inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Manufacturer = "ASUSTeK COMPUTER INC."

Notice the last line, where the manufacturer comes in.

Click Next and finish the wizard.
Then rightclick the collection and choose 'Update Membership'. 
After refreshing the console, you'll notice that it's populated with ASUS devices.
















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!



 




 


Thursday, January 23, 2014

Howto: Deploy Wifi profiles with SCCM

In this post we are going to discuss the possibility of deploying Wifi profiles using SCCM. We are not going to cover the built-in possibility of the distribution of Wifi Profiles in SCCM 2012 R2, because this is limited. We will cover this in a future post.

To start, we have to download a little application called WirelessKeyView.
We will use this little tool to export and import the Wireless profile(s).

Once downloaded, run this tool on a reference machine. Open a command prompt, and key in: wirelesskeyview.exe /export C:\temp\wifi.txt

This will export the profiles to a text file in C:\Temp.

Now copy the text file and the files for WirelessKeyView to your SCCM server (preferrably to the location where the rest of your applications/packages reside).

Now create a batch file with the following commands:
 copy wifi.txt %ProgramData%
WirelessKeyView.exe /import "%ProgramData%\wifi_.txt"
exit /b 0
What this script will do is that it will copy the wifiprofile to your ProgramData directory. The second line will make sure the profile is imported.

Now you can create an application in SCCM which will deploy the above. You can point the detection method to the Programdata\wifi.txt file. Make sure you run the application in the 'user context'.

Friday, January 3, 2014

Howto: Upgrade SCCM 2012 RTM to R2 - Part 2


Howto: Upgrade SCCM 2012 RTM to R2 - Part 2

In the previous blog, we discussed the steps that are necessary to take when upgrading SCCM 2012 RTM to SP1, prior to upgrading to R2.

Once the upgrade to SP1 is successful, you can proceed with upgrading to R2.

Make sure there is a backup or snapshot created before starting the upgrade process!

Step 1. Strange as it sounds, the freshly installed ADK can be removed again. We now need to install Windows ADK 8.1







Step 2: Install ADK 8.1








Step 3: Once finished, reboot the server.
Step 4: Now we can start the prereq check from the setup folder (don't run setup but run the prereq checker standalone)


Step 5: When the prerequisites are okay, the setup to upgrade R2 can be started by starting splash.hta














Step 6: Check the rcmctrl.log with CMtrace to see if the upgrade went well.
Step 7: Once finished, you can start with the installation of hotfix KB2905002 













Step 8: Once the hotfix is installed, reboot the server.
Step 9: Now we can start to upgrade the Microsoft Deployment Toolkit 2012 to version 2013









Step 10: Once MDT is upgraded, don't forget to recreate your boot images! Also recreate the normal SCCM boot images.
Step 11: Check if all Components are up and running. If not, try to resolve the issues.




Step 12: Also make sure your client package is redistributed

Step 13: Distribute the content for the KB2905002 client update packages, and turn on the automatic client upgrade








SCCM 2012 has now been upgraded successfully to 2012 R2!