Showing posts with label sccm. Show all posts
Showing posts with label sccm. Show all posts

Wednesday, 2 December 2015

SCCM Client Version Report

In order to help understand what versions of the SCCM client is out there within our environment I have pulled together this SQL query to help:

select sys.Client_Version0, "CM Name"=
case sys.Client_Version0
when '4.00.6487.2000' then 'CM07 SP2 (4.00.6487.2000)'
when '4.00.6487.2188' then 'CM07 R3 (4.00.6487.2188)'
when '4.00.6487.2187' then 'CM07 R3 (4.00.6487.2187)'
when '4.00.6487.2157' then 'CM07 R3 (4.00.6487.2157)'
when '5.00.7711.0000' then 'CM12 RTM (5.00.7711.0000)'
when '5.00.7804.1000' then 'CM12 SP1 (5.00.7804.1000)'
when '5.00.7804.1202' then 'CM12 SP1 CU1 (5.00.7804.1202)'
when '5.00.7804.1300' then 'CM12 SP1 CU2 (5.00.7804.1300)'
when '5.00.7804.1400' then 'CM12 SP1 CU3 (5.00.7804.1400)'
when '5.00.7804.1500' then 'CM12 SP1 CU4 (5.00.7804.1500)'
when '5.00.7804.1600' then 'CM12 SP1 CU5 (5.00.7804.1600)'
when '5.00.8239.1000' then 'CM12 SP2 (5.00.8239.1000)'
when '5.00.8239.1203' then 'CM12 SP2 CU1 (5.00.8239.1203)'
when '5.00.8239.1301' then 'CM12 SP2 CU2 (5.00.8239.1301)'
when '5.00.7958.1000' then 'CM12 R2 (5.00.7958.1000)'
when '5.00.7958.1101' then 'CM12 R2 KB 2905002(5.00.7958.1101)'
when '5.00.7958.1203' then 'CM12 R2 CU1 (5.00.7958.1203)'
when '5.00.7958.1303' then 'CM12 R2 CU2 (5.00.7958.1303)'
when '5.00.7958.1401' then 'CM12 R2 CU3 (5.00.7958.1401)'
when '5.00.7958.1501' then 'CM12 R2 CU4 (5.00.7958.1501)'
when '5.00.7958.1604' then 'CM12 R2 CU5 (5.00.7958.1604)'
when '5.00.8239.1000' then 'CM12 R2 SP1 (5.00.8239.1000)'
when '5.00.8239.1203' then 'CM12 R2 SP1 CU1 (5.00.8239.1203)'
when '5.00.8239.1301' then 'CM12 R2 SP1 CU2 (5.00.8239.1301)'
else 'Others(non-Clients)'
End,count(*) [Total]
from v_R_System sys
where sys.Name0 not like 'unknown' and
sys.Client_Version0 not like '' and sys.Client_Version0 not like '0.0%'
group by sys.Client_Version0
order by 3 desc

Wednesday, 16 September 2015

Find the Collection Membership of a Specific Machine

There many times during the course of troubleshooting issues within SCCM where you will need to find out what Collections a specific client machine is a member of. Unfortunately there is no native way of finding that out, but you can use SQL and reports to help you find this information.

You can run the following SQL query against your SMS database within SQL Management Studio

select v_FullCollectionMembership.CollectionID As 'Collection ID', v_Collection.Name As 'Collection Name', v_R_System.Name0 As 'Machine Name' from v_FullCollectionMembership
JOIN v_R_System on v_FullCollectionMembership.ResourceID = v_R_System.ResourceID
JOIN v_Collection on v_FullCollectionMembership.CollectionID = v_Collection.CollectionID
Where v_R_System.Name0='ClientMachineName'

Replace ClientMachineName with the device name

You can create a custom report within SCCM. You would need to modify the query slightly, you would replace the ClientMachineName section with a parameter, like so:

select v_FullCollectionMembership.CollectionID As 'Collection ID', v_Collection.Name As 'Collection Name', v_R_System.Name0 As 'Machine Name' from v_FullCollectionMembership
JOIN v_R_System on v_FullCollectionMembership.ResourceID = v_R_System.ResourceID
JOIN v_Collection on v_FullCollectionMembership.CollectionID = v_Collection.CollectionID
Where v_R_System.Name0=@Comp

I would encapsulate the above query into one dataset and use that to populate the table results within the report. Then create a second dataset holding the SQL query:
select Name0 from v_R_System

That can be used to populate the options within your @Comp parameter. Your SQL report builder will look something like this:




The above SQL should work both on Configuration Manager 2007 and Configuration Manager 2012.

Thursday, 3 September 2015

Uninstall Project 2013 with Configuration Manager

As I'm sure all of you have found there are lots of helpful articles out there about how to do a silent install of Microsoft Office/Project/Visio/etc through SCCM, but there is very little information out there on how to do an un-install silently. After much head scratching I finally found the method of doing so...

1. Navigate to the directory where your install files are located
2. Edit the config.xml file located within prjstd.ww (note this changes depending on the version of Project)
3. Remove the values from the Display level line and change it to look like below


4. Within your SCCM deployment modify the Uninstall file to read:
setup.exe /uninstall prjstd /config prjstd.ww/config.xml (again note the visio version name will differ depending on the edition)


5. Click OK and test the uninstallation via SCCM software centre


Friday, 24 July 2015

Uninstall Visio 2013 with SCCM

As I'm sure all of you have found there are lots of helpful articles out there about how to do a silent install of Microsoft Office/Project/Visio/etc through SCCM, but there is very little information out there on how to do an un-install silently. After much head scratching I finally found the method of doing so...

1. Navigate to the directory where your install files are located
2. Edit the config.xml file located within vispro.ww (note this changes depending on the version of Visio)
3. Remove the values from the Display level line and change it to look like below


4. Within your SCCM deployment modify the Uninstall file to read:
setup.exe /uninstall vispro /config vispro.ww/config.xml (again note the visio version name will differ depending on the edition)


5. Click OK and test the uninstallation via SCCM software centre

Tuesday, 7 July 2015

Running Configuration Manager 2012 Remote Control standalone

In some instances you might not want to roll out the full SCCM console but still allow the user to run the Remote Control SCCM tool.

Here is how to do it:

1. Find the directory where the AdminConsole is installed, example: C:\Program Files(x86)\Microsoft Configuration Manager\AdminConsole\bin\i386, copy the following directory and files:
0000049
CmRcViewer.exe
RdpCoreSccm.dll

2. Copy the whole directory and the files to the computer you want to run Remote Control from. You can create a folder anywhere on the computer, i.e My Documents\Remote Control

3. Then simply launch the CmRcViewer.exe file and that is you!

Friday, 3 July 2015

Changing Startup to Automatic on the SCCM Remote Control Service

One of the biggest bugbears within the support staff is that the Configuration Manager 2012 Remote Tools client service is set to Automatic (Delayed Start) when installed as default.

If you are working on a users machine and you have to restart it, it can often feel like an age before you can remote control the machine again.

Using Group Policy and a Group Policy Preference Settings you can change this. Under Services add the SCCM Remote Control Service and change the startup type to “Automatic”.


Monday, 15 June 2015

Shrink the SQL Server Reporting Services log database used by ConfigMgr 2012

So today I came across an issue with my SCCM database server running low on disk space. On investigation I found the ReportServer_log.ldf file had grown to over 320GB in size!

It would appear this is a known issue and some simple configuration changes to your database setup can resolve this.

Change the recovery model
1. Log onto SQL Management Studio and connect to the SCCM instance
2. Expand Databases and right click on ReportServer (your name may vary depending on your installation)
3. Go to Options
4. Change the recovery model from Full to Simple
5. Click OK to save the changes

Shrink the file
1. Log onto SQL Management Studio and connect to the SCCM instance
2. Expand Databases and right click on ReportServer (your name may vary depending on your installation)
3. Select Tasks > Shrink > Files
4. Under File type select Log and click OK
5. This should reduce the size of the LDF file to a more modest size, you may have to repeat the shrink step two or three times for it to complete successfully

Change the Maximum File Size
1. Log onto SQL Management Studio and connect to the SCCM instance
2. Expand Databases and right click on ReportServer (your name may vary depending on your installation)
3. Select Properties
4. Select Files
5. In the Database files field, scroll until you see the Autogrowth column.
6. Click on the ellipsis button (…) for ReportServer_log (again this name may vary slightly depending on your installation)
7. Change the value of the Restrict File Growth (MB) field to a suitable amount for your environment.
8. Click OK to save the changes

This should now resolve your issue and not see it reoccur.

Friday, 5 June 2015

PXE Boot Dell Venue 11

I recently had to image a Dell Venue 11 7130 vPro tablet using SCCM 2012. The BIOS version the table had installed (A10) wouldn't allow PXE boot, I had to upgrade the tablet to use the A13 BIOS version before it would PXE boot.

http://www.dell.com/support/home/us/en/19/product-support/product/dell-venue-11i-pro/drivers

Tuesday, 2 June 2015

Patch ConfigMgr 2012 x64 clients during a task sequence using the PATCH property

We recently updated our SCCM version to the latest cumulative update and I wanted to update our task sequence so that new clients were deployed with the latest SCCM agent version.

In order to do this I completed these steps (please note we only deploy 64 bit clients so this tutorial only deals with these):

1. Open your task sequence

2. Within your Partition Disk 0 - BIOS/Partition Disk 0 - UEFI steps ensure the main partition has the following variable set OSDTargeSystemDrive

3. Create a command line step directly before the "Setup Windows and ConfigMgr" step

4. Within the command line enter the following text: cmd /c xcopy *.* %OSDTargetSystemDrive%\windows\CCMHotfixes /E /H /C /I /Q /Y and select the package that your patch resides in

This step copies the file from your SCCM server to the machine being imaged

5. Within your "Setup Windows and ConfigMgr" step enter the following within Installation properties: PATCH="C:\windows\CCMHotfixes\configmgr2012ac-r2-kb3054451-x64.msp"
You will need to change the filename as appropriate based on the update you are applying.

Tuesday, 7 April 2015

Deploying Windows Update (.msu) with SCCM

I was recently packaging up an application for SCCM and one of the pre-requisites of this application was that a Windows Update (.msu) had to be installed.

In order to package up this Windows Update and deploy it as an application I did the following:


  • To silently install the update I ran the following command within the application deployment -wusa.exe KBxxxxxx.msu /quiet /norestart
  • In the detection method tab, set the option to "Use a custom script to detect the presence of this deployment type" and select Edit
  • Change the script so that it is set to Powershell and enter in the following command -
    get-hotfix | Where-Object {$_.HotFixID -match "KBxxxxxx"}
The deployment ran fine after that.  If you have any execution errors from the script you can change the PowerShell Execution Policy to bypass on the SCCM agent client settings. 

Check out my blog post on setting the PowerShell Execution Policy for all SCCM agents - http://www.techielass.com/2015/03/powershell-execution-settings-sccm-agent.html


Thursday, 2 April 2015

PowerShell Execution Settings SCCM Agent

If you are using any kind of PowerShell commands within your SCCM application deployments you and are having issues getting the commands to run because of the the PowerShell Execution Policy level then a way around it is to do the following:


  • Within the SCCM console go to Administration > Client Settings > Open Default Client Settings
  • Click on Computer Agent
  • Set the PowerShell Execution Policy to Bypass
  • Click OK
This setting will take a while to roll out to all your clients but should fix any errors you've been having with PowerShell running. 

Monday, 30 March 2015

Move a Distribution Point Content Library Between Drives

If you have installed a Distribution Point onto a server and you wish to change the drive that the content is now stored on you can do this by using the "ContentLibraryTransfer.exe" tool that was released within the SyStem Centre 2012 R2 Configuration Manager Toolkit.

Download it here - http://www.microsoft.com/en-us/download/confirmation.aspx?id=36213 and install the components

ContentLibraryTransfer.exe is a tool that will move a distribution point’s content store from one drive to another. It's a very simple process.

To use the tool, open an administrative command prompt and navigate to the location of the ContentLibraryTransfer.exe tool.

Once there the syntax of the tool is as follows:

ContentLibraryTransfer.exe -SourceDrive D -TargetDrive F

So the above command would move the content from the D drive to the F drive.

If you want to see a log file of what has happened etc you can pipe the results to a text file as follows:

ContentLibraryTransfer.exe -SourceDrive D -TargetDrive F > C:\Results.txt



Monday, 23 March 2015

Enabling Powershell support in your boot image - SCCM 2012 R2

I am currently running SCCM 2012 R1 CU3 (version 5.0.7958.1401) and was looking to add Powershell support to my Boot Images but was constantly coming up against an error message.

Let me walk you through the process, the error message and solution.

To add Powershell support to your Boot Image, launch your SCCM Console and browse to Software Library > Operating Systems > Boot Images



Right click on the Boot Image you wish to modify and click Properties. Then click on Optional Components.

Click on the Yellow star to add a component



If you type Powershell into the filter it will display three options, select "Windows Powershell (WinPE-Powershell)".  A prompt will come up telling you that you need to enable "Microsoft .NET (WinPE-NetFx)"



If you click OK three times you will be prompted that you have made a change and you need up update the distribution points.  Click YES and the update Distribution Points Wizard will display, let the wizard run.

The Wizard will fail and offer the following error message:



The problem is that when you filter the optional components it hasn't automatically enabled the "Microsoft .NET (WinPE-NetFx)" component that is needed alongside Powershell.  You need to manually add this in also.

So click on Close on the failed distribution wizard.

Right click on the boot image that you wish to modify, select Properties and Optional Components.  Powershell should still be listed, so click on the yellow star and search for "NetFx" and select this and Click OK three times.  Again you will be prompted to update the distribution points.



Allow this to complete and you will be provided with a window saying your boot image has been successfully updated.

The lesson learned here is if you are filtering the optional components, ensure you read any warnings that are shown and manually check the other required components.