Query for user affinity

I had a customer ask for a query that would show which users were primary on clients based on user device affinity data.  There are a few views that are related to UDA data (https://technet.microsoft.com/en-us/library/dn581963.aspx) and you can join these on a few different columns, depending on the view.

The v_UserMachineRelationship view shows users and their primary devices and  the v_UserMachineIntelligence view shows more detailed information about the affinity, like number of logons, time spend for each session, etc.  So, the following query is a result of that work.  I didn’t care about local account logons so I’m using the WHERE to filter those out.


SELECT  v_GS_COMPUTER_SYSTEM.Name0 AS name, v_UserMachineRelationship.UniqueUserName, v_UserMachineIntelligence.ConsoleMinutes, v_UserMachineIntelligence.LastLoginTime, v_UserMachineIntelligence.NumberOfLogins

FROM v_GS_COMPUTER_SYSTEM INNER JOIN v_UserMachineRelationship ON v_GS_COMPUTER_SYSTEM.ResourceID = v_UserMachineRelationship.MachineResourceID INNER JOIN v_UserMachineIntelligence ON v_UserMachineRelationship.MachineResourceID = v_UserMachineIntelligence.MachineResourceID

WHERE (v_UserMachineRelationship.UniqueUserName LIKE ‘bennett%’)

order by name, consoleminutes desc

“This operation can not be completed at this time” during add MS Intune subcription to CM

You are attempting to add a Microsoft Intune subscription to your ConfigMgr site and the "This operation can not be completed at this time" message appears.  Fun.  Maybe if you try it later it will work?  Probably not.

 

This typically means that the Intune tenant you are attempting to associate with CM (and thereby set CM as the mobile device management authority) already has the authority set to something else (typically Intune). This may happen if you were using Intune as a standalone implementation for a bit and then decided to integrate it with CM.  In order to address this, run, don't walk, to your computer and open a Microsoft Premier support incident to reset the authority.  Although Microsoft says the authority cannot be changed it may be possible but you'll need to engage a Premier support engineer to do it.  The reason you should run is the turnaround time can be 24 hours or more (maybe even 5 days) for this change to take affect.  Once you open the support incident you can save some time and be proactive on the steps that the engineer will ask you to perform before the authority reset is started.

Open the Intune portal (manage.microsoft.com) and:

  • Retire any enrolled devices.  Selective wipe is OK.
  • Delete any sideloading keys
  • Delete any certificates (like iOS APN) that were added to Intune
  • Delete any apps that were added to Intune
  • Delete any policies that created

Can I migrate a CM 2012 site to a CM Current Branch site?

Is it possible to use the Configuration Manager migration feature to migrate objects from a Configuration Manager 2012 site to a Configuration Manager Current Branch site? 

In the past, the migration feature of CM has required that (unless you were migrating from CM 2007) that the source and target be the same version of CM 2012.  Reference here https://technet.microsoft.com/en-us/library/gg682006.aspx  "Beginning with System Center 2012 Configuration Manager SP1…..migrate from System Center 2012 Configuration Manager infrastructure to another deployment of Configuration Manager that runs the same version."

Suppose you are currently running CM 2012 and want to build a new parallel hierarchy to run CM CB and then migrate objects over.  This may be a common scenario due to OS requirements for CM CB (Server 2012 or later) and SQL 2012 (or later).  Now, CB 1602 will allow you to perform an inplace OS upgrade (say from Server 2008 to Server 2012) but most customer aren't comfortable with upgrading a server OS, they would rather start with a fresh install.  So, if the prior migration guidance still applies, you would have to either:

  • upgrade source CM 2012 to CM CB, install target CM CB site, then migrate
  • keep source site at CM 2012, install CM 2012 on target site, migrate and then upgrade target site to CB.

Those aren't bad solutions, just has some extra steps that would be nice to avoid.  Luckily, CM CB supports migration from a CM 2012 source site. Reference https://technet.microsoft.com/en-us/library/mt593351.aspx#BKMK_SupportedMigrationVersions&nbsp 

"You can migrate data from a source hierarchy that runs any of the following versions of Configuration Manager:

  • Configuration Manager 2007 SP2
  • System Center 2012 Configuration Manager SP2 or System Center 2012 R2 Configuration Manager SP1
  • A System Center Configuration Manager hierarchy of the same or lesser version of System Center Configuration Manager"


That's great news.  I've tested this in my lab and seems to work on CB 1511 when I migrated from a CM 2012 R2 SP1 site.  Monitor the migmctrl.log and you will see lots of Query against Legacy Site messages.  I hope you find this helpful

Query for memory slot types

I was working with a customer to figure out how many different variations of computer memory card slots they had in the environment.  Turns out there are many (DIMM A, DIMM_A, Slot 1, Slot_1, Top Slot, Bottom Slot, etc). The query is a very specific use case but putting it here in case it helps you out.  If nothing else it's a sample on how to do counts. 

SELECT DISTINCT COUNT(DeviceLocator0) DeviceLocator0
FROM            v_GS_PHYSICAL_MEMORY
GROUP BY DeviceLocator0

my Christmas lights project

99% of the content I post here is about Configuration Manager, Intune, Microsoft in general.  This post will be different.

A month or so ago I purchased the Raspberry Pi 2 Ver B package that included Windows 10 IoT and some hardware to play with.  I loaded the Win10 OS, played with a few of the python scripts and hardware items that are included in the kit, pretty cool stuff.  However, my goal was to quickly put together a solution that would manage my outdoor Christmas lights display.  This has traditionally been a very static display with no automation, no music, etc.  My goal for this project was to control the lights via the RasPi and add music. Again, my goal was to quickly put this together and I began looking at code that others had built that I could leverage.  There wasn't much available yet for Windows 10 so I focused on running Raspbian Jessie as my OS.  Hopefully I will have more time next year and can move this to Win10.  Raspbian, coupled with a  great product called LightShowPi, helped me complete in a couple weeks what would probably have taken me months to develop myself.

Here is a video of the first run thru of the final product, details on how I got there to follow:  https://www.youtube.com/watch?v=6Jvy0cXRpHw

The Hardware:

I am using the Raspberry Pi 2 model B (https://www.raspberrypi.org/products/raspberry-pi-2-model-b/).  The original Pi works also but I wanted the extra goodies the Pi 2 has, so that it was I bought. Also this is not part of this year's project but I also purchased the official Raspberry Pi LCD display (OFFICIAL RASPBERRY PI FOUNDATION 7" TOUCHSCREEN LCD DISPLAY)  Note that this item is highly backordered currently so very expensive.  Wait a few months and it should get back to $60 price. 

I am using the Sainsmart 8 channel solid state relay (http://www.sainsmart.com/8-channel-5v-solid-state-relay-module-board-omron-ssr-4-pic-arm-avr-dsp-arduino.html) to control the power.  You could use the mechanical version but you are going to hear a lot of clicking and also I understand it may not hold up to the rigors of running holiday lights.

I purchased various packs of M-F, M-M, F-F connectors, here are some I bought  Female to Female Solderless Flexible Breadboard Jumper Cable Wire 40 Pcs

I am broadcasting the MP3 audio via FM radio so that people can tune in their car radios and hear the music in sync with the lights.  Lightshowpi includes PiFM that could possibly perform that task but it's pretty buggy on RasPi 2, seems to work better on the original RasPi.  As a result, I just purchased a low range FM transmitter and transmit on 95.5FM SainSonic AX-7C FM Transmitter Mini Radio Stereo Station PLL LCD with Antenna – Fashion Black 

Each of the 8 channels on the SSR can support 2 amps so you need to make sure that the lights you are plugging into that channel do not exceed 2 amps.  You can guess how much power the lights use, you can read the manufacturer's info (which may not be accurate) or you can test it.  I use this for every light string I plug in: P3 International P4460 Kill A Watt EZ Electricity Usage Monitor

There are many ways to connect the light strings to the channels in the SSR.  I went with extension cables, more on how that gets connected later Etekcity 10 Pack Power Extension Cord Cable Strip, 16AWG/13A, UL Listed, 2015 Upgraded Version


You will also need a variety of extension cables, the lights themselves (I'm using mostly LCD), etc.

 

 

 

What does this package status number mean?

I was working on a pull DP issue (the dreaded invalid package status log entry) and needed a list of the possible package status values.  Here you go:

0 PKG_STATUS_NONE 

1 PKG_STATUS_SENT 

2 PKG_STATUS_RECEIVED 

3 PKG_STATUS_INSTALLED 

4 PKG_STATUS_RETRY 

5 PKG_STATUS_FAILED 

6 PKG_STATUS_REMOVED 

7 PKG_STATUS_PENDING_REMOVE -possibly not used

8 PKG_STATUS_REMOVE_FAILED 

9 PKG_STATUS_RETRY_REMOVE 

it’s like finding an app in an app store haystack

If you are reading this, it's possible, even likely, that you are diving into the awesomeness that is Microsoft Intune.  Maybe you are using it standalone or maybe you are in full blown UDM heaven and manage everything with the magic of ConfigMgr 2012 + Intune.  Sweet.

Say that you've been asked to publish a couple apps from the store to your mobile devices.  Say that you need to publish the Microsoft Yammer app to your managed iOS and Android devices.  Why Yammer?  Because it's awesome.  So, you basically need to go into your ConfigMgr console (this article assumes you are living in a UDM world), go to the Software Library, Select Applications, right click and choose Create Application.  For the type you will select either App Package for iOS from App Store (that's for the iOS devices, in case you weren't sure) or App Package for Android on Google Play (that is for the Android devices).

Once you select the appropriate app type the wizard is going to ask you for the location of the content, so it basically wants the http/https link to the app in the App Store or Google Play store.  You could click the Browse button and that particular store would open up in a window and you can hunt and peck and might eventually find what you are looking for in the thousands of apps that are available in these stores.  Or, you could apply a little logic to this and make it really simple.  So, when it's time to provide that http (or https) link for the location of the app, do this:

iOS apps

Use the iTunes Link Maker. What a catchy name! The URL for this is https://linkmaker.itunes.apple.com/us/.  Once you go to that site, it's pretty obvious what you need to do.  You enter the name of the app in the Search field, evaluate whether the country value should be left as USA, change the media type to iOS apps and leave Genre set to All if you want.  Click Search.  In the results pane below the search bar find the app that matches what you are looking for.  It just might be the first one on the list.  To the right of the app you are looking for you'll see iPhone app link.  Click it.  At the next window, locate the entry that appears below Direct Link.  That address is what you need.  Select that string of text (https://itunes.apple.com/us/app/yammer/id289559439?mt=8&uo=4 in this case), copy it to the clipboard, go back to the location field in the create app wizard and paste in the value.  The angry red exclamation point should go away.  Change the app name, publisher and other info as you see fit and continue thru the wizard.

Android apps

Google doesn't have a super cool name for their automated link maker thing, it's just Google play.  That's ok.  Go to https://play.google.com/store and enter yammer in the search field.  Locate the app you need from the matching search items and click on it.  Go up to the top of your browser and note the web site address for the yammer app (https://play.google.com/store/apps/details?id=com.yammer.v1 in this case) and do the copy/paste deal again at the location field in the App Package for Android on Google Play wizard.  Change the app name, publisher and other info as you see fit and continue thru the wizard. 

Done.  Use the time you saved to get some fresh air.

a prompt status message query

I deliver our Configuration Manager RAP as a Service offering many times for our Microsoft Premier customers.  The risk assessment looks at a great deal of data, including the frequency of when warning and error status messages are being submitted by clients or site servers.  For example, “Site server not successful installing some clients via Client Push Installation: Warning status message ID 3015“.  Ok, so I work with the customer remediating this issue, we make some changes to how their client push is configured and they want to be able to see if the issue is improving.  Maybe they were seeing an average of 45 of those messages on a given day before the changes.  How many are they seeing now?  Great question.  So how do we find out?  There are reports that can tell you this (All messages for a specific message ID, for example).  However, I find it a bit quicker and easier just to run a status message query that prompts for the message ID.  This is nothing fancy, just a quick status message query based on the message ID entered at the prompt.  Enjoy the video.  There is no audio. Feel free to add your own soundtrack. And you might need to right click on the video and select zoom unless you have really good eyesight.

update: 10/11/15

adding the query, plus a command to limit results based on date.

select SMS_StatusMessage.*, SMS_StatMsgInsStrings.*, SMS_StatMsgAttributes.* from  SMS_StatusMessage left join SMS_StatMsgInsStrings on SMS_StatMsgInsStrings.RecordID = SMS_StatusMessage.RecordID left join SMS_StatMsgAttributes on SMS_StatMsgAttributes.RecordID = SMS_StatusMessage.RecordID where SMS_StatusMessage.MessageID = ##PRM:SMS_StatusMessage.MessageID## and SMS_StatusMessage.Time >= ##PRM:SMS_StatusMessage.Time##

What is the latest version of the system center endpoint protection definition file?

Need to make sure your auto deployment rules are getting the latest definition files to your clients?  This link can be tricky to find but here you go, it shows the latest version: http://www.microsoft.com/security/portal/definitions/whatsnew.aspx.  You can also get the RSS feed here: http://www.microsoft.com/security/portal/rss/updatesrss.aspx

Updated link:  https://www.catalog.update.microsoft.com/search.aspx?q=definition%20update%20endpoint%20protection