Sunday 25 July 2010

Inventory Windows 2008 Roles in ConfigMgr

One of my staff is currently designing our new Citrix XenApp 6 farm and I've set him the task of doing as much of the software deployment and building of it via SCCM as possible.

While we were talking about it he mentioned it would be good if we could have a dynamic collection containing all 2008 R2 servers with the Remote Desktop Session Host feature installed rather than having to remember to keep adding servers all the time.

So I showed him how to edit the sms_def.mof (found in %Drive%\Microsoft Configuration Manager\inboxes\clifiles.src\hinv) to add the following:

[ SMS_Report (TRUE),
SMS_Group_Name ("Server Feature"),
SMS_Class_ID ("CUSTOM|SERVER_FEATURE|1.0") ]

class Win32_ServerFeature : SMS_Class_Template
{
[SMS_Report (TRUE), key ] uint32 ID;
[SMS_Report (TRUE) ] uint32 ParentID;
[SMS_Report (TRUE) ] string Name;
};


This then allowed us to create a collection with a query looking for a Server Feature that equaled 130.

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_CUSTOM_SERVER_FEATURE_1_0 on SMS_G_System_CUSTOM_SERVER_FEATURE_1_0.ResourceID = SMS_R_System.ResourceId where SMS_R_System.OperatingSystemNameandVersion like "%Server 6.1%" and SMS_G_System_CUSTOM_SERVER_FEATURE_1_0.ID = 130

You can find a reference list of 2008(R2) roles here: http://msdn.microsoft.com/en-us/library/cc280268(VS.85).aspx

Saturday 24 July 2010

Windows 7, 2000 Level Domains & SP1 Fixes

While trying to help on the ConfigMgr forums the other day I found this useful, but some what random piece of information:

Windows 7 & Server 2008 R2 cannot join a Windows 2000 Domain via a script if an OU is specified.

This will obviously cause problems if you're using a task sequence to join either of these OS's to a 2000 level domain and specify an OU.

More information can be found at http://support.microsoft.com/kb/979645

SP1 is at Beta 1 at the time of writing but for more information on the currently included patches in the upcoming SP1 for Windows 7 & Server 2008 R2 have a look here: http://technet.microsoft.com/en-us/library/ff817572(WS.10).aspx

Med-V v2 Intergration with SCCM

While looking for some further information about something else, I came across something else interesting that someone had happened to tell me at the MMS UK event in London that I was at in May but I'd forgotten until now.

http://windowsteamblog.com/windows/b/business/archive/2010/06/07/virtualization-updates-at-teched.aspx
We’ve been investing in Microsoft Application Virtualization (App-V) and Microsoft Enterprise Desktop Virtualization (MED-V), two key components of the Microsoft Desktop Optimization Pack for Software Assurance (MDOP) to help our customers migrate to Windows 7 with greater ease, and today we are announcing that a MED-V v2 beta will be available in CYQ4. MED-V v2 will provide a seamless user experience that will take advantage of Virtual PC 7 enabling USB support. It will also be fully manageable by System Center Configuration Manager which will simplify overhead and management for IT professionals.

Wednesday 21 July 2010

Pinning Icons to the Windows 7 Taskbar

The Deployment Guys posted an article a couple of months back on how to script pinning shortcuts to the Windows 7 Taskbar.
http://blogs.technet.com/deploymentguys/archive/2009/04/08/pin-items-to-the-start-menu-or-windows-7-taskbar-via-script.aspx

However, the scripting method won't work during an SCCM OSD deployment as the task sequence runs in the Local System context which has no shell access and the script depends on the Explorer shell because it is executing shell verbs.

So, there's another way:
You can copy icons to the C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar folder if you want to make them available to all profiles created AFTER you've copied icons into it.

This is handy I find when creating images as it allows for quick customisations to the taksbar that will affect all users loging onto the machine after it's had the image deployed to it and can easily be added as a "Run Command Line" task in an SCCM OSD Task Sequence.

If the folder doesn't exist (Doesn't by default if I remember correctly) then just create it. I also then set it to hidden like it is in a normal user profile, but I'm just a neat freak :P

Also, if you use a reference computer to set the icons in the order that you require, exporting the data from this registry key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband] will then allow you to re-import it into the default users profile to affect the icon order for all your users.

RegKey to Mof

Here's a very useful little util created by Mark Cochrane for creating MOF snippets to gather data from a registry key using Configuration Manager:

http://www.myitforum.com/absolutenm/templates/Articles.aspx?articleid=18519&zoneid=89

EMC CLARiiON Monitoring with SCOM

Following on from my post the other day, here's some more information that I found on the EMC forum. Please note that you MUST be registered & licenced for Navisphere to access it.
Ref: https://community.emc.com/message/440029

-----------------------------------------------------------------------------------------



If you are licensed for Navisphere then the SCOM pack for CLARiiON is available on Powerlink at:

Home > Support > Software Downloads and Licensing > Downloads J-O > Navisphere Server Based Software

Home > Support > Software Downloads and Licensing > Downloads C > CLARiiON AX4-5


Introduction to CLARiiON Management Pack for SCOM

CLARiiON's initial integration with SCOM is through a Windows host that is setup as a CLARiiON monitoring server. This monitoring server retrieves CLARiiON Events, which is established through the creation of a Navisphere template, into the Monitoring servers Windows Application Event Log. Once an associated event is presented to the monitoring servers Application Event Log the CLARiiON SCOM pack will determine if the event should be raised as an alert into SCOM. For this initial release of the CLARiiON SCOM pack there are a selected number of CLARiiON Events that will raise a SCOM alert. These 89 CLARiiON Events are a subset of the total CLARiiON Navisphere Alerts that are available. They have been selected because they are the most commonly seen alerts and also provide actionable details that are associated with the alert.

These 89 alerts are as follows: (NOTE: These CLARiiON Event Numbers are subject to change with each version of the CLARiiON Management Pack)

0x7400 0x7408 0x7209 0x720E 0x7212 0x7219 0x7472 0x744B 0x745D
0x7401 0x7409 0x720A 0x743A 0x7213 0x721A 0x721B 0x7000 0x7223
0x7465 0x740A 0x720B 0x743B 0x7214 0x7443 0x7444 0x721C 0x7461
0x7229 0x7434 0x720C 0x720F 0x7440 0x722B 0x7445 0x721D 0x7222
0x7402 0x7204 0x7435 0x7210 0x7215 0x7600 0x7446 0x721E 0x7460
0x7403 0x744C 0x7436 0x743C 0x7216 0x7462 0x7447 0x700B 0x7226
0x7404 0x7205 0x720D 0x743D 0x7441 0x7463 0x7448 0x745F 0x7224
0x7405 0x7206 0x7437 0x7211 0x7442 0x7464 0x7449 0x7221 0x7227
0x7406 0x7207 0x7438 0x743E 0x7217 0x7470 0x721F 0x745E 0x7228
0x7407 0x7208 0x7439 0x743F 0x7218 0x7471 0x744A 0x7220


Setting CLARiiON Monitoring for use with SCOM

1. Navisphere Agent Installed on CXMonitoringServer
2. Proper credentials need to be setup during install
3. CXMonitoringServer needs registration with the CLARiiON Array
4. CXMonitoringServer needs to have proper credentials on the SP Agent tab in order to be used as monitoring station.
5. On the CLARiiON array, a template needs to be created linking which events will be logged into the Windows Application Log as shown below in figure 1. The below picture shows this SCOM_Template properties as well as which storage system this template is in use for and which Windows System the template is logging to the Application Event Log.
6. NOTE: In this example I've selected only the CLARiiON Alert events because they contain all of the listed event numbers above as well as few more....best practice will be to select only the events that will cause a SCOM alert to be raised, thus only select the 89 events listed above.
7. Once the template is in place the array will beginning logging events within the Windows Event Viewer Application Event Log as shown below in figure 2. The events circled below are examples of what the events look like when they are generated on the Windows Application Event log.

Installing SCOM Agent on a CXMonitoringStation

There are a few different ways manage the CXMonitoringStation from SCOM:

•(Default) From the SCOM Server you can push the SCOM Agent on the hosts you wish to monitor.
•Install the Agent directly on the host you are going to monitor via a CD or network share.
•Or you can elect not to install an agent on the server being monitored (known as Agentless Managed)

Microsoft recommends using the default method which will push the SCOM Agent onto the host that will be monitored from the SCOM server. If for some reason ports are blocked that are needed to push the SCOM Agent onto the monitoring server then you'll have to install the SCOM Agent onto the monitoring server via CD or network share. In the steps below I'll show you how to install the SCOM Agent by pushing the Agent from the SCOM server onto the monitoring server.

1. From the SCOM Server select Administration and Agent Managed
2. Right click on the Agent Managed and select Discovery Wizard
3. Select Advanced Discovery and in the drop down under Computer & Device type select Servers & Clients click next
4. Select Browse for or Type-in Computer name and add the CXMonitoringStations Computer name click next
5. Select the Computer you want to management and select the Management Mode (in this case Agent Managed) and select next. Shown below in Figure 3
6. Change or leave the Agent installation directory and select your preferred account settings (default is recommended) and then click finish
7. This will begin the installation of the SCOM Agent onto the CXMonitoringStation.

Importing CLARiiON Management Pack on SCOM Server

SCOM Server has several default management packs that comes with the installation of the SCOM server itself. The reason for this is so other third party management packs can leverage the work that exists within the default management packs in order to prevent duplicate work. The CLARiiONMP.mp file is the name of the management pack that needs to be imported into SCOM server in order to for SCOM Administrators to begin reaping the benefits of CLARiiON Alerts within SCOM.

To import the CLARiiON Management Pack

1. Select Administration and then right click on Management Packs and select Import Management Pack
2. Browse for the path of the CLARiiONMP.mp file and import the management pack.

If you are upgrading from and earlier version of the management pack you can just re-import the new management pack and it will override the old management pack without issues. Once the management pack is imported you can begin testing the SCOM pack to ensure it is working properly.

Saturday 17 July 2010

EMC Clariion SCOM Management Pack

I looked ages ago to try and see if EMC had a management pack that would help us monitor our EMC SAN, but failed to find anything.

Then the other day out of the blue, Rob found this:
http://msopsmgr.blogspot.com/2010/07/emc-clariion-management-pack.html

Wednesday 14 July 2010

Using the SCCM Dashboard with SCOM Data

Talking to Rob today and remembered to show him the Configuration Manager dashboard.

When I mentioned that it could also be used to pull data from the SCOM database and do pretty pie charts etc it perked his interest.

When I get time tomorrow I'll see if he's got any interesting SQL queries he's used to build his dashboard and share them here.

Until then Anders Bengtsson has some great SQL snippets on his blog http://contoso.se/blog/?p=1409

Service Manager Authoring Console RC Released

It's about time!

Microsoft released today the Release Candidate of the System Center Service Manager Authoring Console.

Any server with a SCSM component installed requires an update (This includes the Datawarehouse, Self Service Portal and any clients with the console installed).

The update is here:
http://support.microsoft.com/kb/983572

and the tool is here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=40b8f1b7-da63-46ae-9ca4-ef007fc3cb29&displaylang=en

Finally custom forms can be created easier than having to know Visual Studio at a developer level!

I've started with some initial tests today and I'll post some more details tomorrow.

Monday 12 July 2010

Configuration Manager Dashboard

I finally managed to get the dashboard installed!

After all the time I spent banging my head on the desk it turned out to be rather simple.
The problem I was getting was it appeared to install fine, until the very last moment and then it would roll-back all the changes.

Turns out it was Server 2008 R2's UAC getting in the way.

Where as an EXE allows you to right click and run-as Administrator an MSI doesn't, but since it then prompts later for elevation I presumed everything was fine and dandy. Not so...

In the end I ran CMD as Administrator and then launched the MSI from there with msiexec /i and it ran through and installed fine.

The simple things eh?

On that note, Microsoft have a couple of really good blog posts with some handy SQL queries that create some really good dashboards.


http://blogs.msdn.com/b/shitanshu/archive/2010/04/08/part-1-how-microsoft-it-using-configuration-manager-dashboard.aspx

http://blogs.msdn.com/b/shitanshu/archive/2010/04/11/part-2-using-configuration-manager-dashboard-for-software-update-deployment-readiness-patch-tuesday-checklist.aspx

http://blogs.msdn.com/b/shitanshu/archive/2010/05/02/part-3-sql-queries-used-for-creating-custom-configuration-manager-dashboard-in-microsoft-it.aspx

Saturday 10 July 2010

BSOD during OSD - AMD CPU's

I was working on cutting our images back down to a single WIM last month and decided to tackle the WIM we had to create for devices with AMD CPU's that were Blue Screening while using our main image.

Turns out that it was related to an incompatible file from Intel.

The issue is known about when upgrading from XP SP2 to SP3, not that this applied to me, but I thought I'd give the fix a try anyway and it worked!

The manual fix looks like this:
1.Restart computer and press F8 key repeatedly until Windows Advanced Options Menu appears.
2.Choose Safe Mode.
3.Browse to C:\Windows\System32\Drivers.
4.Find a file named “intelppm.sys” and rename it to “XXXintelppm.syx“.
5.Restart

So it was easy enough to add a Run Command Line step to our task sequence after applying the WIM with a WMI Query filter on for the affected CPU Type to rename the file.

There's apparently another couple of similar problems with different methods to fix it so I'll list them, but I've not tried them myself.

Disable intelppm.sys via the registry:
http://blogs.msdn.com/b/virtual_pc_guy/archive/2005/10/24/484461.aspx

Microsoft Hotfix:
http://support.microsoft.com/kb/953356/en-us

Friday 9 July 2010

System Center Service Manager 2010

I've had the pleasure of testing System Center Service Manager 2010 (SCSM) since it RTM'd and I've got to say that so far it's shaping up to be a brilliant product, but that's not to say it hasn't got it's flaws.

I'm just about to install the SCSM Dashboard Solution Accelerator so I'll leave this post at this for now but I'll be posting one or two things soon about SCSM and where it's impressed me/solved a business need or annoyed me/missed vital bussiness needs.

SCSM Dashboard link:
http://technet.microsoft.com/en-us/library/ff758669.aspx

Chassis Type vs Model Name

We currently use WMI Query filters in our task sequences to make sure things like AD OU placement for mobile devices gets applied to the devices that need it.
These lists are starting to get a little long now, especially as we've had a larger turn over of different manufacutures in the last 18 months than we used to have.

So I was thinking the other day if there might be a better way and I remembered that WMI stores the chassis type in Win32_SystemEnclosure and that SCCM gathers this.

However... nothing is ever straight forward.
It turns out that just because there's a long list of different chassis types to choose from, the manufactures decided they would. Therefore when I expected to see lots of "Desktop" what I did see was "Desktop", "Pizza-Box", "Mini-Tower" etc.

The SQL Query below is a tidied up version that at least makes it reasonably easy to read. I'll post again when I've had chance to put this into a full report, probably with some more aggregation to just show Desktops, Mobile Devices & Servers.

SELECT v_R_System.Name0,
CASE WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '1' THEN 'Virtual' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '2' THEN 'Blade Server' WHEN
v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '3' THEN 'Desktop' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '4' THEN 'Low-Profile Desktop' WHEN
v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '5' THEN 'Pizza-Box' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '6' THEN 'Mini Tower' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0
LIKE '7' THEN 'Tower' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '8' THEN 'Portable' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '9' THEN
'Laptop' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '10' THEN 'Notebook' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '11' THEN 'Hand-Held'
WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '12' THEN 'Mobile Device in Docking Station' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '13'
THEN 'All-in-One' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '14' THEN 'Sub-Notebook' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '15' THEN
'Space Saving Chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '16' THEN 'Ultra Small Form Factor' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0
LIKE '17' THEN 'Server Tower Chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '18' THEN 'Mobile Device in Docking Station' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0
LIKE '19' THEN 'Sub-Chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '20' THEN 'Bus-Expansion chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0
LIKE '21' THEN 'Peripheral Chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '22' THEN 'Storage Chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0
LIKE '23' THEN 'Rack-Mounted Chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '24' THEN 'Sealed-Case PC' ELSE 'Unknown' END AS 'Chassis Type'
FROM v_R_System INNER JOIN
v_GS_SYSTEM_ENCLOSURE ON v_R_System.ResourceID = v_GS_SYSTEM_ENCLOSURE.ResourceID



Chassis TypeDisplay Name
1Virtual Machine
2Blade Server
3Desktop
4Low-Profile Desktop
5Pizza Box
6Mini Tower
7Tower
8Portable
9Laptop
10Notebook
11Hand Held
12Docking Station
13All-in-One
14Sub Notebook
15Space Saving Chassis
16Ultra Small Form Factor
17Server Tower Chassis
18Mobile Device in Docking Station
19Sub-Chassis
20Bus-Expansion Chassis
21Peripheral Chassis
22Storage Chassis
23Rack Mount Unit
24Sealed-Case PC


*Updated 27/01/2010* - Slight typo as I had 65 as Tablet PC, removed.  Also added easy read table.

Report not showing device Serial Numbers

While I was searching for a serial number for a device that needed reporting to the suppliers as faulty the other day I noticed that our report was showing a lot of systems with entries such as "To Be Filled By O.E.M." or "00000000".

This is down to SCCM using v_GS_SYSTEM_ENCLOSURE_UNIQUE.SerialNumber0 in default reports which pulls the serial number from the SerialNumber field in Win32_SystemEnclosure where some (awkward) manufacturers use SerialNumber field in Win32_BIOS.

However, with a little tweaking to the report it now shows all (well, more than before) the serial numbers from across different manufactures that store it in a different location in WMI.

SELECT DISTINCT
v_R_System_Valid.Netbios_Name0 AS [Computer Name], v_R_System_Valid.User_Name0 AS [Last User Logon],
CASE WHEN (v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP.TopConsoleUser0 IS NULL OR
v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP.TopConsoleUser0 = '-1')
THEN 'Unknown' ELSE v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP.TopConsoleUser0 END AS [Top Console User],
v_GS_OPERATING_SYSTEM.Caption0 AS [Operating System], v_GS_OPERATING_SYSTEM.CSDVersion0 AS [Service Pack Level],
v_GS_COMPUTER_SYSTEM.Manufacturer0 AS Manufacturer, v_GS_COMPUTER_SYSTEM.Model0 AS Model,
[Serial Number] = CASE
when v_GS_SYSTEM_ENCLOSURE_UNIQUE.SerialNumber0 ='00000000'
OR v_GS_SYSTEM_ENCLOSURE_UNIQUE.SerialNumber0 ='Not Available'
OR v_GS_SYSTEM_ENCLOSURE_UNIQUE.SerialNumber0 ='To Be Filled By O.E.M.'
OR v_GS_SYSTEM_ENCLOSURE_UNIQUE.SerialNumber0 ='N/A'
OR v_GS_SYSTEM_ENCLOSURE_UNIQUE.SerialNumber0 ='None'
OR v_GS_SYSTEM_ENCLOSURE_UNIQUE.SerialNumber0 IS NULL
then v_GS_PC_BIOS.SerialNumber0
Else
v_GS_SYSTEM_ENCLOSURE_UNIQUE.SerialNumber0
End

FROM v_R_System_Valid INNER JOIN
v_GS_OPERATING_SYSTEM ON v_GS_OPERATING_SYSTEM.ResourceID = v_R_System_Valid.ResourceID LEFT OUTER JOIN
v_GS_SYSTEM_ENCLOSURE_UNIQUE ON v_GS_SYSTEM_ENCLOSURE_UNIQUE.ResourceID = v_R_System_Valid.ResourceID INNER JOIN
v_GS_COMPUTER_SYSTEM ON v_GS_COMPUTER_SYSTEM.ResourceID = v_R_System_Valid.ResourceID INNER JOIN
v_FullCollectionMembership AS v_FullCollectionMembership_1 ON v_FullCollectionMembership_1.ResourceID = v_R_System_Valid.ResourceID LEFT OUTER JOIN
v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP ON v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP.ResourceID = v_R_System_Valid.ResourceID inner join
v_GS_PC_BIOS on (v_GS_PC_BIOS.ResourceID = v_R_System_Valid.ResourceID)
WHERE (v_FullCollectionMembership_1.CollectionID = @CollectionID) AND (NOT (v_GS_COMPUTER_SYSTEM.Manufacturer0 LIKE 'VM%')) AND
(NOT (v_GS_COMPUTER_SYSTEM.Manufacturer0 LIKE 'micro%'))
ORDER BY [Computer Name]


The SQL query above is set to use a prompt for the collection to run against so don't forget to either change this, or add a prompt for @CollectionID when creating the new report in the console.
I've also set the query to filter out virtual devices as I don't report on these using this report.

Where, what, who, eh?

Ermm... I kind of forgot I had a blog, hence it being so quiet.

Prepare for a storm of posts!