When developing extensions to Service Manager you want to be able to use the localization support of Service Manager. The strategy chosen by the product team of Service Manager is to store localized content primarily in management packs. When you’re creating new management packs you define the ”strings” that should be displayed in the Service Manager console depending on which language the console is currently running under. You do this in the LanguagePacks section of your management packs as shown in the picture below.

As you see in the picture you can define different language packs. Within these you add references to elements of your management packs. For instance you can specify what should be the displayed name of a list item defined in the management pack. You could specify different names for English, Swedish and all other languages that could be used by your Service Manager interacting users.
To be able to use these localized values in custom forms within the Service Manager console you do this by using data binding as explained in this post by Travis Wright. Now if you’re creating an application outside the console that needs to display data from Service Manager (using the SDK) you want to be able to reuse the localization made in Service Manager. Let’s say that you want to display, as it was in my case, a localized list. To retrieve the localized values from Service Manager you use an object called ManagementPackDisplayString. You simply retrieve a ManagementPackDisplayString from the element you want to get a localized value from using a specified CultureInfo. In the picture below I’m retrieving the localized name of a list.

As you see you’re also able to get a localized description of the object. The “CurrentCulture†as seen in the picture is the culture your application is currently running under. For more information regarding CultureInfo start here.
Important, you need to make sure that there is a localization of an element in the specified language before you try to retrive it. If you try to retrive a localized value in a culture that doesn’t exist as a LanguagePack the “GetDisplayString” method will throw an exception.
Who is using the computer?
By · CommentsWith the upcoming ConfigMgr vNext beta approaching I want to give some reflections of the functionality that exist today in ConfigMgr 2007 that will be even more used in ConfigMgr vNext. Starting with the Asset Intelligence top user functionality.
One of the largest issues when implementing an asset management system or helpdesk system is to fetch the information of the computer-to-user mapping. The most common way is to set this manually, but this is hard to maintain correctly in the long run because this kind of information is dynamic. Computers could be borrowed between co-workers or moved between departments without IT is notified. There were an last-logged-on-user inventory entry before (and it’s still present…) but that inventory are based on what specific user was logged on to the computer during the actual inventory execution on the client, and if nobody was logged on at that time the entry was empty. So it wasn’t a trustworthy source getting this information. But with the introduction of Asset Intelligence in ConfigMgr a possible solution for this issue was released that not everyone is aware of exists. In this post I will try to describe this functionality in more detail and how this is enabled.
By evaluating logon and logoff events Asset Intelligence calculates the number of times a user has been logged on to the computer as well as the total amount of time in minutes that the user has been logged on to the computer. All this information gathered with time limit of data within the last 90 days, this is then sent as a part of hardware inventory and made available in reports and for use by external products like asset/helpdesk systems. Below is a short description how you enabled this in your environment:
Enable to audit successfully account logon events on computers
- Applying the settings below manually or using an group policy

Enable Asset Intelligence in ConfigMgr console

- Open ConfigMgr Console
- Expand Site Database – Computer Management
- Right-Click Asset Intelligence and Select Enable
- Select Enable only…. And check reporting classes SMS_SystemConsoleUsage and SMS_SystemConsoleUser then click OK
- Click YES in the warning dialog (The extra resources this takes has not caused any problems from my experience even for very large customers)
- Finished
At the next hardware inventory the inventory will be populated with this information. If you haven’t had the policy to audit successfully account logon events enabled for an long time it can take different amount of times dependant on the hardware inventory frequency getting in the information into the inventory. This information is then used by ConfigMgr to populate a row for each computer with the TopUser for the computer based on the total logon count and total time where total time has precedence. This information can also be fetched in reports or queries by accessing the SQL view v_GS_SYSTEM_CONSOLE_USAGE.
The SQL view v_GS_SYSTEM_CONSOLE_USER makes it possible to see all users that has logged on to a specific computer to make a top list of the users based on your own criteria. It’s also possible to get a list of all computers a users has been logged on to the last 90 days.
Some of the ConfigMgr 2007 built-in reports are:
- Hardware 03A – Primary computer users
- Hardware 03B – Computers for a specific primary console user
- Hardware 04A – Shared (multi-user) computers
- Hardware 05A – Console users on a specific computer
As you can imagine the potential are huge making dynamic solutions based on this.
Asset Management MP for Service Manager 2010
By · CommentsIn a collaborative project we, Patrik Sundqvist and Anders Bengtsson have created an embryo of an Asset Management extension for Service Manager. Our thoughts behind this management pack are to build a version one that we could extend in the future. It is not a feature complete asset management solution for enterprise organizations, but it is a foundation that could give you some ideas what you could do with Service Manager 2010.
Download management pack here and the management pack guide here.

Revealed highlights of ConfigMgr vNext
By · CommentsAs you probably already know a new version of ConfigMgr are scheduled to be released next year. Microsoft is calling it ConfigMgr vNext but my guess is that the RTM name will be ConfigMgr 2011. In this post I want to share information and my views on some of the new functionality and changes in ConfigMgr vNext that has been revealed by Microsoft. ConfigMgr vNext TAP nomination is open and you can find the nomination survey here. Rumors say that beta program should start in the end of March. I’m really excited that a new version is coming; it’s a special event for a system management techie that only occurs every five years and experience say that it only gets better if you look at the history of SMS/ConfigMgr products.
Hierarchy
Microsoft is aiming for ConfigMgr vNext hierarchy designs to be less complex and easier to maintain, and their solution is to introduce a new site server Central Administration Server (or CAS), it will be the central point of administration and will not be able to manage any clients. Additionally changes of the site server’s relations will be huge. Primary site servers will no longer have the ability to have Parent/Child relation to each other, instead secondary site servers will. This is the exact opposite to how it’s working today. Role based delegation is introduced that enables easier and more granular delegation of tasks.
Replication
Today’s Inbox replication will be replaced by native SQL replication. As it is today all replicated information is processed on every site server it passes causing excessive unnecessary workload on the site servers. By changing to SQL replication hopefully the site servers will have more resources for more important operations. Another new feature is the ability to bandwidth throttle distribution points, today if data transfer between the site server and distribution point is unmanaged. This feature will really enable you to use non-dedicated servers on branch offices as distribution points without setting up them as secondary servers.
Software Management
Here you have been working the last six years convincing customers to move from user to computer based distribution because of licensing, and now Microsoft is starting to talk about User Centric distribution. Don’t be alarmed it’s not as drastic as you think, it’s almost genius. A new object will be introduced “Application”. The Application object will be advertised to the user and can contain rules how to react when the user moves between platforms and clients. For example a rule could say that the application should only be installed on clients where the user is inventoried by ConfigMgr as the TopUser of the computer. If then the user temporary is logging on to a colleagues computer the application will not be installed there. Rules could also be defined for different software installation when moving between different platforms like mobile and Desktop Services. I will describe this new object in much more detail´s in later posts.
Self-Service
ConfigMgr vNext will deliver a Self-Service Portal. The user will be able to enter a portal and install available applications instantly. The application object mentioned earlier will contain the application details that will be shown in the portal as well have multi-language support for the application details. It will also be basic approver functionality for application that has a high cost. But in reality this should be connected to Service Manager and I hope that Patrik will show how this could be done in a later post as soon as the first ConfigMgr vNext beta is released.
This was a sum up of what’s coming on the ConfigMgr horizon. As soon as I get my hands on the beta I promise to give you some more reflections.
Views – Filtered by related object properties
By · CommentsWhen creating a view in the Service Manager console you might want to filter the listed objects based on a related object’s property. Since I got a question last week regarding a scenarios like this, I thought I go ahead and describe how this could be done. In this example I’m creating a view tha lists all change requests that are assigned to a swedish user. Follow the instructions below to create such a view:
- Start by right clicking on the â€Change Management†folder and click “Create viewâ€.

- Name the new view, provide a description and select in which management pack you want to store the view.

- Click browse in the criteria section and select â€Combination classes†in the “View†drop down list. Select a the combination class called “Change Request (Advanced)” and press OK.
This is the key to success since you want to be able the query a combination class (a type projection) instead of only a simple class. A combination class provides access to related objects and there properties.

- Since you selected a combination class (a type projection) you can now have a search criteria that is based on properties of items that are related to the change request in your view.

- Select the “Assigned To User” in the left pane of the criteria section. Then check the checkbox for the “Country” attribute in the right pane of the criteria section, click the add button and write “Sweden” in the textbox.

- Select which columns to display in your view and close the wizard.
You’re done!
To test the view, make sure you have a user object with the country value “Sweden” and a change request with this user as the “Assigned To” user.
Note: The same method could be used to list all incidents that has affected user that speaks a certain language
Dots messing up your binding path
By · CommentsWhen naming the properties of a class in a management pack you should stay away from dots (“.”) in the property id. Some times you might feel tempted to include a dot after a prefix (maybe the company name or something) in the id property as you might do for the id of a custom management pack. Including a dot in the id of a property will mess upp the binding path of your forms which will result in your forms not storing the modified values in the instances.
Thanks for verifying Anders!
OK
<Property ID=“MyDate“ Type=“datetime” />
<Property ID=“Prefix_MyDate“ Type=“datetime” />
Not OK!!!
<Property ID=“Prefix.MyDate“ Type=“datetime” />
Related dates in Service Manager views
By · CommentsMy collegue Anders and I is playing with Service Manager in the sandbox today. We just notice a nice feature when creating views. You can create them based on related dates. For example if you want to show all items modified the last week you could configure the view according to the picture below.
When upgrading ConfigMgr 2007 clients to SP2 there could be a problem upgrading the clients using one program. This because if you use the ccmsetup switch SMSSITECODE=AUTO users travelling between different locations can be accidentally reassigned to the primary site at the location where the client was located during the actual upgrade, that could cause advertisements to run again on the client. Why using one program you think, well using one program will ease you administration effort doing the upgrade because you can use one collection for all clients. Finally to the solution, I made a script that queries the client’s assigned site code and then uses this for the ccmsetup parameter SMSSITECODE, if there are no assigned site code AUTO is used. Put this script in the source folder of your ConfigMgr 2007 SP2 client and run the script as the installation command. Please remember that the script is delivered AS IS without any warranties.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | Option Explicit On Error Resume Next Dim cmclient,WshShell,wshFSO,strSiteCode,strExitCode,strCmdLine Set cmclient = CreateObject("Microsoft.SMS.Client") Set WshShell = CreateObject("WScript.Shell") Set wshFSO = CreateObject("Scripting.FileSystemObject") strSiteCode = cmclient.GetAssignedSite If strSiteCode <> "" then strCmdLine = SourceDir & "\Ccmsetup.exe /noservice SMSSITECODE=" & strSiteCode strExitCode = WshShell.Run(strCmdLine, 0, True) WshShell.LogEvent 0, "ConfigMgr 2007 SP2 client upgrade executed command: """ & strCmdLine & """" & CHR(10) & "Exitcode: " & CSTR(strExitCode) Else strCmdLine = SourceDir & "\Ccmsetup.exe /noservice SMSSITECODE=AUTO" strExitCode = WshShell.Run(strCmdLine, 0, True) WshShell.LogEvent 0, "ConfigMgr 2007 SP2 client upgrade executed command: """ & strCmdLine & """" & CHR(10) & "Exitcode: " & CSTR(strExitCode) End if Function SourceDir SourceDir = Left(WScript.ScriptFullName,Len(WScript.ScriptFullName) - Len(WScript.ScriptName) -1) End Function wscript.quit(strExitCode) |
When customizing Service Manager you might want to create a custom form for a custom class. You’ll probably end up with some code behind for some fancy stuff interacting with the form. Maybe you want to list data from a remote data source? When dealing with scenarios like this it’s always nice to be able to debug your code. Here are the steps you need to go through to be able to debug a custom form or a custom console task (a task in the ”Task pane”) from within Visual Studio.
- In the code behind, add suitable breakpoints.

- Make sure that you’ve configured the build procedure to use “Debug” mode by opening the “Configuration Manager…” and choosing the “Debug” option in the “Configuration” drop down.*


*If you don’t see the “Configuration Manager…” menu item. Enable it by going into “Tools” – “Options”, under “Projects and Solution” – “General” you check the “Show advanced build configurations” and click OK. - Build your debug assembly files by clicking “Build” – “Build Solution” in the menu.

- Go to the “Debug” output directory of your project. Copy the assembly file (.dll) and the program debug database file (.pdb) containing your form and debugging information.
- Paste the files into the Service Manager install directory (normally “C:\Program Files\Microsoft System Center\Service Manager 2010″) on your Service Manager server.
- Open the Service Manager console.
- In Visual Studio go to “Tools” – “Attach to Process” and select the process called “Microsoft.EnterpriseManagement.ServiceManager.UI.Console.exe” and click “Attach”.
- You’re now ready to debug your custom form or task. Open up your custom form or click your custom task within the console and you should hit your break points within Visual Studio.
