Power BI : Active Directory v/s SCCM Boundaries : [FREE PBIX]

Purpose :

Active Directory Sites and System Center Configuration Manager Boundaries are hard to keep in sync – especially in an environment where there are regular changes and several team managing each technology separately.

This Power BI dashboard solution will help analyze and reduce down the gaps in SCCM. The dashboard will help SCCM administrators / architects to resolve issues where clients are not covered – this helps in Client Health / Reporting and Compliance.

The dashboard is based off the Powershell script posted on Technet by Scott Breen and can be downloaded from here : https://gallery.technet.microsoft.com/Validate-Boundary-Group-d85ed496

How to use this :

A. The script can be configured to run on schedule via Scheduled Tasks on a server or via System Center Orchestrator.

B. The output CSV can be placed on a network share on local folder.

C. Power BI will read this csv and perform the necessary DAX operations.

D. Power BI can further be used to publish on o365 on the Power BI portal. Power BI gateway can be configured so that the content is autoupdated on a schedule. Embedded Power BI options can be used to inject the dashboard into Sharepoint or any site.

Backend engine :

The output [download csv here] of the script needs some work to be done and looks like this >


The last column is most important in this csv output – the result ‘False’ indicates the machine is not covered by any SCCM Boundary. The other columns provide plenty of information – but its not really presentable or understandable from the get go.

The conversion of the csv data from crude data to human readable format is performed by Power BI and via DAX. The csv file before conversion is available here – BoundaryCheck-csv

The PowerBI dashboard is configured to pull information from C:\PowerBI\adsite-vs-boundaries\Boundarycheck.csv

Get it now !


Download the PBIX.


ConfigMgr : Query to find SCCM client versions (ConfigMgr 2012)


download : SQLQuery-find-agentsversions


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.0000.0000' then 'CM12 RTM (5.00.0000.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.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)'
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 Client_Version0


ConfigMgr : OSD : How To Create a Bootable USB Windows 7 Build Disk



The following are required to build the Windows 7 USB Media:

  • Windows 7 Machine
  • USB Removable Drive


Step by Step: How to prepare the USB

The USB device must be prepared prior to generate the stand alone media.

  1. On a Windows 7 PC, Insert the USB device and launch the command line in administrator mode
  2. Enter: “Diskpart” from a command line
  3. In disk part, Enter: “List Disk” – to view the disk number
  4. Select the device with the command “Select Disk 1” and substitute the number 1 with the correct device ID on your system. Make sure you select the correct device as the next step WILL DESTROY ALL DATA on the device selected.
  5. Enter: “clean” in the diskpart command line and hit “enter”
  6. Enter “create partition primary” in the diskpart command line and hit “enter”
  7. Enter “select partition 1” in the diskpart command line and hit “enter”
  8. Enter “format quick fs=ntfs” in the diskpart command line and hit “enter”
  9. Enter “active” in the diskpart command line and hit “enter”
  10. Enter “assign” in the diskpart command line and hit “enter”
  11. Enter “exit” in the diskpart command line and hit “enter”


For easy reference please check the below screen shot


Now copy the content  of the ISO .

ConfigMgr : SQL Query to find Application and version by location


Download :  SQLQuery-Findmachines-withoutlook-locationspecific


SELECT distinct
v_GS_SoftwareFile a
JOIN v_R_System b ON a.ResourceID = b.ResourceID
JOIN v_RA_System_SystemOUName c ON a.ResourceID = c.ResourceID
WHERE FileName = 'outlook.exe' and AD_Site_Name0 like '%perth%'


ConfigMgr : OSD : Build failure Troubleshooting and Logs gathering


During the Build process if you encounter any issues you can perform further investigation with the below mandatory information

  • Machine model
  • Error code with snapshot
  • Error stage with snapshot (may be hiding behind the Task Sequence error window)
  • Single system failure OR multiple systems failures
  • Build Failure Logs (as described below)
  • Mention if any HW component has been replaced on the machine

Troubleshooting Steps

  1. Do not restart the system when the build failure occurs and shows the Task Sequence error
  2. Please note the error code with snapshot
  3. Note the error stage – the stage build got failed (may be behind the Task Sequence error window)
  4. Press F8 key for Command Prompt
  5. Refer the below table OSD Logs Path for logs location based on failure stage
  6. Copy all the log files to the USB drive connected to System
  7. Attach the gathered logs with incident / email to us for investigation

OSD Logs Path

Smsts.log is found in different locations depending on the stage of failure:

Build Failure Stage Log file location
WindowsPE, before HDD format x:\windows\temp\smstslog\smsts.log
WindowsPE, after HDD format x:\smstslog\smsts.log
Windows, SCCM agent not installed c:\_SMSTaskSequence\Logs\Smstslog\smsts.log
Windows x64, SCCM agent installed c:\windows\sysWOW64\ccm\logs\Smstslog\smsts.log
Task Sequence completed x64 c:\windows\sysWOW64\ccm\logs\smsts.log

Network Setup and Domain Join

For issues related to Build failure at domain joining step please gather the below logs

% SystemRoot %\debug\netsetup.log