Collection query Model

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_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Model like “%Optiplex 7060%”

Dell/HP BIOS UEFI Configuration

Dell Command Configure

@echo off

if defined programfiles(x86) (

call %0%\..\x86_64\HAPI\HAPIInstall.bat

) else (

call %0%\..\x86\HAPI\HAPIInstall.bat


@echo off

Echo This file will install HAPI

%0\..\hapint64.exe -i -k C-C-T-K -p “hapint64.exe” -q

cctk.cmd bootorder –activebootlist=uefi
cctk.cmd –secureboot=enable
HP BIOS Configuration Utility
BiosConfigUtility64.exe /setvalue:”Boot Mode”,”UEFI Native (Without CSM)”
BCU.cmd /setvalue:”Boot Mode”,”UEFI Hybrid (With CSM)”


set cmdline=%*

ECHO == Seting BIOS Settings ==

REM Determine Arch




SET BCU=”BiosConfigUtility64.exe”



SET BCU=”BiosConfigUtility.exe”



ECHO –Running command %BCU% %CMDLINE%


EXIT /B %errorlevel%

Use Legalnoticecaption for OSD Failure message

Set the failure message step after Setup Windows and ConfigMgr.
Set OSD Failure Message
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System /v legalnoticecaption /t REG_SZ /d “The Operating System Deployment FAILED!” /f & REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System /v legalnoticetext /t REG_SZ /d “Please rerun the imaging task by restarting the boot media or contact the Service Desk.” /f

Remove the failure message step before the end of the Task Sequence.
Clear OSD Failure Message
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System /v legalnoticecaption /t REG_SZ /d “” /f & REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System /v legalnoticetext /t REG_SZ /d “” /f

Redistribute failed packages

# Redistribute failed packages without clicking view status -> redistribute package

$SiteCode = “P01”

$PackageState = “3”

$FailedPackages = Get-WmiObject -Namespace “Root\SMS\Site_$($SiteCode)” -Query “select * from SMS_PackageStatusDistPointsSummarizer where state = $($PackageState)”

if ($FailedPackages.Count -gt 0)


Write-Host “There are $($FailedPackages.Count) Failed Packages at the moment.”


elseif ($FailedPackages)


Write-Host “There is 1 Failed Package at the moment.”




Write-Host “There are 0 at the moment.”


if ($FailedPackages)


foreach ($FailedPackage in $FailedPackages)




$DistributionPointObj = Get-WmiObject -Namespace “root\SMS\Site_$($SiteCode)” -Class SMS_DistributionPoint -Filter “PackageID=’$($FailedPackage.PackageID)’ and ServerNALPath like ‘%$($FailedPackage.ServerNALPath.Substring(12,7))%'”

$DistributionPointObj.RefreshNow = $True

$result = $DistributionPointObj.Put()

Write-Host “Refreshed $($FailedPackage.PackageID) on $($FailedPackage.ServerNALPath.Substring(12,7)) – State was: $($FailedPackage.State)”




Write-Host “Unable to refresh package $($FailedPackage.PackageID) on $($FailedPackage.ServerNALPath.Substring(12,7)) – State was: $($FailedPackage.State)”

write-host $Error




Documenting your Task Sequences Automagically (Update – v2)

Open PowerShell from your sccm console as an admin so you are connected to your site server

Just export your task sequence using the following command (Get-CMTaskSequence | Where-Object {$_.Name -eq “YourTaskSequenceName”}).Sequence | Out-File “C:\Temp\YourFileName.xml”

Copy tsDocumentorv2.xsl to the same folder as your task sequence.

Open your task sequence YourFileName.xml in your favourite text editor.

Enter the following as the first line:

<?xml-stylesheet type=”text/xsl” href=”tsDocumentorv2.xsl” mce_href=”tsDocumentorv2.xsl”?>

Save your task sequence file and open it in Internet Explorer. Presto!
The XSL takes care of formatting, indents and sizing.

Disclaimer: The information on this site is provided “AS IS” with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use.

This post was contributed by Aly Shivji a consultant with Microsoft Services – U.S. East Region.


Clear Software Center when a task is stuck at Downloading/Installing

$ccmProgram = Get-WmiObject -Namespace ROOT\CCM\ClientSDK
-Class CCM_Program | Where-Object {$_.EvaluationState –eq 14}

If ($ccmProgram -ne $null)


$ccmExecutionRequestEx = Get-WmiObject -Namespace ROOT\CCM\SoftMgmtAgent –Class
CCM_ExecutionRequestEx | Where-Object {$_.RunningState -eq
“NotifyExecution” -and $_.AdvertID -gt “” -and $_.ContentID
-eq $ccmProgram.PackageID}

($ccmExecutionRequestEx -ne $null)


$ccmExecutionRequestEx | Remove-WmiObject

Start-Process sc.exe -ArgumentList “config smstsmgr depend=
winmgmt/ccmexec” -Wait

Restart-Service -Name CcmExec -Force



Repair SCCM Client issues

Great Client repair utility

SCCM Client Tool for

1.fixing WMI issues

2. Ping issues

3. Client Health issues

4. change client cache size

5. Install / Uninstall SCCM Client

6. Repair Update Cycles …. etc

The tool is downloadable as a ZIP file that contains four files:
ClientActionsTool.hta – The tool itself.
Cmdkey.exe – command line tool for managing cached credentials. This is needed for alternate credentials feature when running the HTA on Windows XP. Cmdkey.exe is natively available starting from Windows Vista.
Wol.exe – command line tool from Gammadyne Corporation to send wake up packets to remote computers.
Config.ini – A configuration file for default settings. This file is not required to run the tool, but if it doesn’t exist, the tool may prompt for the data every time it’s run.

Troubleshoot Management Points


Invalid MP cert info; no signature

Failed to query http://… for MP location

Step 1) verify the mplist and mpcert

if you get the cert page and mp list the mp is working

Secure Delete Files Permanently with SDelete

Secure Delete Files Permanently with SDelete

Contents of the Software Package:

– sdelete.exe

– sdeleteEULA.reg:


Windows Registry Editor Version 5.00





Restart Computer to WinPE

– Secure Wipe C Drive

— Copy SDelete

xcopy.exe “.\*.*” “%WinDir%” /E /C /Q /H /R /Y /I

Package: SDelete

— Accept SDelete EULA

regedit.exe /S sdeleteEULA.reg


— Format and Partition Disk

Disk number: 0

Disk Type: Standard(MBR)

Volume: Primary NTFS (Quick Format)

— 7 Pass Drive Wipe

sdelete.exe -p 7 -c -z


Add Packages to WinPE

Dism /Mount-Image /ImageFile:”C:\Temp\prodbootv62\sources\boot.wim” /index:1 /MountDir:”C:\Temp\Mount”

## Dependencies: Install WinPE-WMI > WinPE-NetFX > WinPE-Scripting > WinPE-PowerShell

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\”

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\”

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\”

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\”

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\”

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\”

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\”

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\”

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\”

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\”

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\”

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\”

Dism /Add-Package /Image:”C:\Temp\Mount” /PackagePath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\”

Dism /Unmount-Image /MountDir:”C:\Temp\Mount” /commit

Dism /Cleanup-WIM

cd C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment

copype amd64 C:\WinPE_amd64

Makewinpemedia /iso C:\WinPE_amd64 C:\Temp\prodbootv62.iso

Auto Apply Drivers or Apply Driver Package

Auto Apply Drivers

This action relies on Plug’n’Play (PNP) detection from within Windows PE (WinPE) to scan the hardware that is present, and send this list to the Management Point (MP). The MP replies with a list of compatible drivers that are available on local Distribution Points (DPs), and the Task Sequence downloads and installs the drivers to the C: drive where they can be used by Windows the next time it boots. This action looks for matching drivers across all Driver Packages on all DPs that are accessible in the client’s site boundaries. Without specifying any Driver Packages in the Task Sequence, all matching drivers that are not disabled and not filtered out by a category are considered, regardless of what the package is named or what the original intent of the package was.

Advantages: This action requires the least amount of administration of drivers and driver packages, PNP does most of the work.

Disadvantages: Does not work with standalone media, does not detect hardware that is not present or disabled (i.e. external/USB devices, multi-level drivers, disabled in the BIOS, wireless/Bluetooth with an off switch, etc.) and does not support mass storage drivers for operating systems prior to Windows Vista/Server 2008. You have less control over driver versions, if an SCCM admin downloads different drivers and adds them to any Driver Package and replicates the package to DPs, then any Task Sequence with the Auto Apply Drivers step will find them and possibly consider them a better match. So you could have machines imaging fine one day, and then the next day problems arise or even blue screens, without the Task Sequence ever changing.

Details: The Auto Apply Drivers step in the TS performs these steps:

WinPE performs a PNP scan (devices that are disconnected or turned off are not detected)

WinPE submits the results of the PNP scan to the MP for matching

The MP returns the locations of drivers that are applicable, not disabled, not filtered out by Categories, and accessible on DPs within the current boundaries

WinPE downloads them, and depending on the OS to be installed:

Windows XP: Installs them to the correct folders under C:\Windows

Windows Vista/7/8: Directly adds them to the image’s driver store using DISM for use during Windows (mini-)setup phase

No drivers get loaded under WinPE, but the drivers are installed for the Windows PNP to find on the next boot


Apply Driver Package

This action does not rely on PNPID detection and always installs all drivers included in a Driver Package, regardless of whether they are valid for that hardware or not. The Driver Packages should be grouped together logically (i.e. by operating system and hardware model) to avoid installing unnecessary drivers on the system (not because this would cause problems, drivers that are not needed are not loaded and just consume disk space). The Task Sequence step can be targeted at specific models using a WMI query.

Advantages: Provides the most control over which drivers and which versions get installed for a particular model, allows drivers to be installed for hardware that may not be present during the Task Sequence, and works with standalone media.

Disadvantages: Requires more up front administration to get the Driver Packages grouped, requires additional disk space on the Distribution Points if the drivers apply to more than one model and need to be included in more than one Driver Package.

Details: The Apply Driver Package step in the Task Sequence performs these steps:

Tries to find the package on a DP that is accessible within the current boundaries

WinPE downloads them (even if they are not needed or not applicable), and depending on the OS to be installed:

Windows XP: Installs them to the correct folders under C:\Windows

Windows Vista/7/8: Directly adds them to the image’s driver store using DISM for use during Windows (mini-)setup phase

No drivers get loaded under WinPE, but the drivers are installed for the Windows PNP to find on the next boot. Unnecessary drivers are ignored by PNP.


Most smaller companies and test labs can use Auto Apply Drivers, and it can work fine for months or years, but at some point a new driver could start getting detected as valid for older hardware and cause issues. Larger companies with a diverse or global administration model usually prefer Apply Driver Package. Some companies might prefer a hybrid approach, where the Task Sequence runs an Auto Apply Drivers step first to get most of the required drivers, and then runs Apply Driver Package steps for each model that requires additional handling.


The Import New Driver Wizard does not actually import the driver files into the SQL database, it only creates metadata information about the drivers and stores the path to the source files. The import source files need to remain in the same path after the import wizard is complete, since they will be used to update driver packages and boot images.

After you have imported new drivers, it’s good practice to manually verify the operating systems selected as supported platforms. This is done by editing the Properties and selecting the Applicability tab. The wizard tries to assign the correct platforms based on information in the .INF files, but these files are not always correct and often needs to be corrected to match the information provided on the vendor’s website or in the readme files.

I try to avoid adding any unnecessary drivers to the Windows PE boot images. Generally I try to use the default drivers provided by Windows PE, and only add drivers for mass storage controllers and network adapters when needed, or to improve performance. Do some benchmarking from Windows PE, and make sure the disk I/O for SATA drives averages at least 40MBps for writes and 80MBps for reads. Make sure the network I/O is at least 600Mbps on Gigabit, and 70Mbps or better on Fast Ethernet.

Both of the Task Sequence driver steps can only be ran from WinPE, not under full Windows.

For Windows Vista/7/8, all driver steps need to be added during the “offlineServicing” configuration pass of setup (after the “Apply Operating System Image” step, but before the “Setup Windows and ConfigMgr” step).

On pre-Vista operating systems, any mass storage and boot critical drivers must be installed with Apply Driver Package, not Auto Apply Drivers.

Thanks to Jason Sandys for input and feedback on this info.

Delegate Control Domain Join failed

NetpJoinDomainOnDs: Function exits with status of: 0x216d


“Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased.”

By default any authenticated user can add up to 10 workstations to the domain.

After that you need the appropriate rights.

You can either get the rights delegated (recommended) or increase the default limit for authenticated users (not recommended).

Status Message Queries: Monitor Office 365 Installation

Peter Monten gave me a cool query for SCCM 2012 to monitor an deployment.
It is compatible with all deployments in SCCM and so I changed it for our Office 365 – 2016 rollout.

select stat.*, ins.*, att1.*, att1.AttributeTime from SMS_StatusMessage as stat left join SMS_StatMsgInsStrings as ins on stat.RecordID = ins.RecordID left join SMS_StatMsgAttributes as att1 on stat.RecordID = att1.RecordID inner join SMS_StatMsgAttributes as att2 on stat.RecordID = att2.RecordID where att2.AttributeID = 401 and att2.AttributeValue = “XYZ20198” and stat.SiteCode = “XYZ” and att2.AttributeTime >= ##PRM:SMS_StatMsgAttributes.AttributeTime##

order by att1.AttributeTime desc

Unable to export Task Sequence with dependencies in SCCM 2012 R2 SP1


Object reference not set to an instance of an object.

Stack Trace:

at Microsoft.ConfigurationManagement.Migration.ObjectSerialization.Modeling.PrototypeImpl.TryGetPropertyValue(Object instance, String propertyName, Object& value)

at Microsoft.ConfigurationManagement.Migration.ObjectSerialization.Modeling.EntityHandle.TryGetValue[T](String propName, T& value)

at Microsoft.ConfigurationManagement.AdminConsole.MigrationAssistant.ExportPageControl.relatedWoker_DoWork(Object sender, DoWorkEventArgs e)

at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)

at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

Remove the checkmark “Use an unattended or Sysprep answer file…” from Apply OS step, the export goes fine.

Activate Windows 10 on KMS

Because there is still no new server key available (2016).
VLSC has provided us a special Windows 10 activation key.

Windows Srv 2012R2 DataCtr/Std KMS for Windows 10

For those guys who don’t understand this.
To activate Windows Clients on KMS running Windows Server, you need the Server Key to activate your client.

Remove Duplicate SSRS Folders & Solve SSRS not working issues

* Uninstall old SCCM Client

C:\Windows\ccmsetup\ .\ccmsetup.exe /uninstall

* Clean CCM WMI

Get-WmiObject -Namespace “root” -Query “SELECT * FROM __Namespace where name= ‘ccm'” | Remove-WmiObject

* Uninstalled Reporting Services Point Role from SCCM 2012 R2

* Ran the script by (Mike Laughlin) after editing “SiteCode” & “Server Name” to clean up OLD files leaving only the ConfigMgr_”SiteCode” folder


# SCCM2012SP1-RemoveDuplicateSSRSFolders.ps1

# This script will connect to SSRS on a specified server and delete all folders that end with .OLD.*

# Used for SSRS cleanup after SCCM 2012 SP1 installation

# Script must be run from an account that has access to modify the SSRS instance

# 3/22/2013 – Mike Laughlin


# Resources used in writing this script:

# Starting point:

# API Documentation:

# Previous script:


# Define variables

$SiteCode = “XXX”

$serverName = “SACCESQLXXX.XXX.local”

# Set the value of $noConfirm to $True only if you don’t want to manually confirm folder deletion. Use with caution.

$noConfirm = $False

# Safeguard

If ( $SiteCode -eq “” -or $serverName -eq “” ) { Write-Host “Enter the required information for the SiteCode and serverName variables before running this script.” -ForegroundColor Red -BackgroundColor Black ; Exit }

# Connect to SSRS

# $ssrs = New-WebServiceProxy -uri http://$serverName/ReportServer/ReportService2005.asmx?WSDL -UseDefaultCredential

$ssrs = New-WebServiceProxy -uri http://sccmreportsacc.XXX.local/ReportServer_INS008/ReportService2005.asmx?WSDL -UseDefaultCredential

# Get a listing of all folders in SSRS

$reportFolders = $ssrs.ListChildren(“/”, $True)

# Find all folders containing .OLD.*

$foldersToDelete = $reportFolders | Where { $_.Name -like “ConfigMgr_” + $SiteCode + “.OLD.*”}

# Quit if no folders are found

If ( $foldersToDelete.Count -eq 0 ) { Write-Host “No folders with .OLD.* found. Quitting.” ; Exit }

# Show a listing of the folders that will be deleted

Write-Host “The following folders will be deleted from SSRS on” $serverName”:`n”


Write-Host “`nTotal number of folders to delete:” $foldersToDelete.Count “`n”

# Get confirmation before deleting if $noConfirm has not been changed

If ( $noConfirm -eq $False )


$userConfirmation = Read-Host “Delete these folders from” $serverName”? Enter Y or N”

If ( $userConfirmation.ToUpper() -ne “Y” ) { Write-Host “Quitting, folders have not been deleted.” ; Exit }


# Delete the folders

$deletedFolderCount = 0

Write-Host “Beginning to delete folders now. Please wait.”

ForEach ( $folder in $foldersToDelete ) { $ssrs.DeleteItem($folder.Path) ; $deletedFolderCount++ }

Write-Host “Folders have been deleted. Total number of deleted folders:” $deletedFolderCount


* Run mofcomp to add classes to wmi

PS C:\Users\XXX> mofcomp “C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof”

Microsoft (R) MOF Compiler Version 6.2.9200.16398

Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.

Parsing MOF file: C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof

MOF file has been successfully parsed

Storing data in the repository…


* Reinstalled Reporting Services Point Role

Error 3: Installing Java Runtime Environment 8u65 or 8u66

In case you are wondering, normally I would open the EXE’s and extract the MSI’s.

But today I decided to use the EXE’s with the default commands that Oracle delivers us.

Had some problems with SCCM depencies and with little time, I used a batch file.

When using SCCM and installing it with SYSTEM credentials, the java installer decided to place the msi’s under the appdata from the install account.

Because appdata from the System account is under C:\Windows\System32, it would not do the correct copy actions.

Also it was searching for java.settings.cfg under C:\ProgramData\Oracle\Java , so we needed to place the file there before installing.

I also added some custom settings to the Java configuration.

Placing the file under APPDATA of the current user.

Detection Method:








cmd.exe /c InstallJavaRE8U66.cmd

Batchfile InstallJavaRE8U66.cmd


xcopy java.settings.cfg “%ProgramData%\Oracle\Java\”* /I /S /Y /C /R

xcopy .\jre1.8.0_66* “C:\windows\system32\config\systemprofile\AppData\LocalLow\Oracle\Java\”* /I /S /Y /C /R

xcopy .\jre1.8.0_66_x64* “C:\windows\system32\config\systemprofile\AppData\LocalLow\Oracle\Java\”* /I /S /Y /C /R

timeout.exe /T 30 /NOBREAK

jre-8u66-windows-x64.exe /s INSTALL_SILENT=1 STATIC=1 AUTO_UPDATE=0 WEB_ANALYTICS=0 REBOOT=0 NOSTARTMENU=1 SPONSORS=0 /L C:\Windows\Temp\Install_SDC_Oracle_JavaRE_1.8.0.66_01.00_EN_x64.log

jre-8u66-windows-i586.exe /s INSTALL_SILENT=1 STATIC=1 AUTO_UPDATE=0 WEB_ANALYTICS=0 REBOOT=0 NOSTARTMENU=1 SPONSORS=0 /L C:\Windows\Temp\Install_SDC_Oracle_JavaRE_1.8.0.66_01.00_EN_x86.log

type NUL > %ProgramData%\Oracle\Java\Settings_Java8u66_Installed.txt


java.settings.cfg -> Place this file under C:\ProgramData\Oracle\Java







—————————————————————— -> Place this file under %userprofile%\appdata\locallow\Sun\Java\Deployment\


#Fri Oct 23 18:21:40 CEST 2015





deployment.browser.path=C\:\\Program Files\\Internet Explorer\\iexplore.exe

#Java Deployment jre’s

#Fri Oct 23 18:21:40 CEST 2015




deployment.javaws.jre.0.path=C\:\\Program Files\\Java\\jre1.8.0_66\\bin\\javaw.exe







My blog:

New installation of SCCM 2012 R2 SP1

Upgrading your installation: If you have a System Center 2012 R2 Configuration Manager installation, you can use the System Center 2012 Configuration Manager SP2 media to install the latest patches and automatically upgrade to System Center 2012 R2 Configuration Manager SP1.

New installation: Install System Center 2012 Configuration Manager SP2 first, and then install System Center 2012 R2 Configuration Manager SP1 at the top-tier site of your hierarchy. Both of these installation files are included on VLSC.

Don’t forget to install the latest CU1

Removing Built-in apps from Windows 10 WIM-File with Powershell – Version 1.1

Removing Built-in apps from Windows 10 WIM-File with Powershell – Version 1.1

When creating a Windows-10-Image for the Enterprise you may not want to include all of the default Windows Store Applications.

This script takes a simple list of Apps and then removes the Apps from the default install.wim.

The Script works aso for Windows 8 and Windows 8.1.

Create Temp-Directory -> Mount Windows 10 WIM-File -> Remove all Built-in apps -> Unmount WIM-File -> Remove Temp-Directory. Thats all!

Windows 10: Removing Built-in apps mit Powershell (.wim)

DISM: Edit Bootimage WinPe

Dism /mount-wim /wimfile:s:\winpe\boot_W10_x64.wim /index:1 /mountdir:s:\winpe\mount

Dism /image:s:\winpe\mount /add-driver /driver:s:\winpe\drivers /recurse

Dism /image:s:\winpe\mount /Set-InputLocale:nl-BE

Dism /image:s:\winpe\mount /Set-SysLocale:nl-BE

Dism /image:s:\winpe\mount /Set-UserLocale:nl-BE

Dism /Unmount-Wim /MountDir:s:\winpe\mount /Commit

Dism /Cleanup-WIM

Install Console

ConsoleSetup.exe /q TargetDir=”%ProgramFiles(x86)%\Microsoft Configuration Manager\AdminConsole\” EnableSQM=0 DefaultSiteServerName=SCCMP.CORP.ME

%ProgramFiles(x86)%\Microsoft Configuration Manager\AdminConsole\bin

Reporting Services Site Role Setup: Instance Blank/Empty

When attempting to set up and configure the ConfigMgr 2012 site system role for reporting services, a frequently experienced “problem” is that the instance name can be blank/empty in the wizard and thereby unable to proceed with the wizard. This usually occurs when SRS has not been pre-configured properly.
While it is common “knowledge” that the reporting services database needs to be created first, an oft-overlooked step is to use the Reporting Services Configuration Manager to create the virtual directories for IIS. And it is these steps which need to be completed to get you on your way.
Open Reporting Services Configuration ManagerConnect to the server/instanceClick on Web Service URL – make a fake change, such as changing the name of the virtual directory and then putting it back to ReportServer – and clicking Apply. This will then create the new virtual directories.
Click on Report Manager URL – again, make a change to the name and put back to just Reports – and click Apply to generate the new virtual directories.Close configuration managerReturn to the CM12 site role setup program, click “Verify” for the database connection, and voila the instance is now populated correctly!

Unable to remove the Component Server Site System Role


I am trying to remove a DP from a server. I’ve gone to Administration | Overview | Site Configuration | Servers and Site System Roles

I right-click on the server that is hosting the DP I want to remove and select Delete from the context menu.

However, I then get a Delete Server dialog box stating:

The server “\\<server_fqdn>” cannot be deleted because it contains the following site system roles:

Component server

The component server role supports other site system roles and is created automatically by Configuration Manager. Although there might be a delay, this role is automatically removed after you remove other site system roles on this server.

I’ve tried right-clicking on the Component server role under Site System Roles but the Remove Role option is greyed out so I’m unable to remove the Component Server Site System Role.

As this server is only hosting a DP I don’t understand why it has the Component server installed on it.


The server in question must have had another Site System role installed on it at some point in the past as the Component server role gets installed on a server whenever a Site System role is installed with the exception of a DP (so if the server has only ever run as a DP you will not see the Component server).

Chances are a role other than the DP was installed at some point in the past and removed but the Component server role hasn’t been removed for some reason.

The quickest way to kickstart this is on the affected server:

Right-click Site system under Site system Roles and select Properties from the context menu.

Make a change to a setting on the Site system properties screen such as checking the Require the site server to initiate connections to this site system then click OK.

Wait 10 – 15 minutes.

Refresh the console and the Component server role should now have disappeared.

You should now be able to delete the server hosting the DP.

– See more at:

oobe.xml example

<?xml version=”1.0″ encoding=”utf-8″ ?>
<!– Oobe.xml sample file for the region: Catalonia, Spain
For more info, see Configure Oobe.xml, –>
<!– Name of the manufacturer –>

<!– If a relative path is used, it will start from the same folder as Oobe.xml.
Example: %WINDIR%\System32\Oobe\Info\Default\1031\fabrikam_eula.rtf –>

<!– Set the defaults for the language, location, locale, keyboard, and timezone –>
<!– App language.
See Available Language Packs for Windows, Language decimal identifier –>

<!– Country or region where the PC is deployed.
See Table of Geographical Locations, Geographic location identifier (decimal) –>

<!– PC locale. Determines sorting, time/date formatting, and keyboards/IMEs.
See Default Input Locales for Windows Language Packs, keyboard decimal identifier: –>

<!–Keyboard layout.
Use the keyboard value list in the registry under
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Keyboard Layouts,
or see Windows Language Pack Default Values, keyboard pair: –>

<timezone>Central Europe Daylight Time</timezone>
<!– Use the time zone list in the registry under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones –>

<!– Use this to adjust the time for Daylight Savings Time –>


Changing the language of the SCCM Console

Rename the language pack folder within the install directory of your Management console.

System Center Configuration Manager 2012:
C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\{language_code}

Close the management console.

Rename the language pack folder corresponding to your situation.

In my case it is nl.

Rename it to nl_backup.

Restart your console.

Activate Office/Windows under Task Sequence


Set KMS Host

cscript OSPP.VBS /sethst:KMS.FQDN.local

C:\Program Files (x86)\Microsoft Office\Office15


Activate Product

cscript OSPP.VBS /act

C:\Program Files (x86)\Microsoft Office\Office15


Install for non windows-kms server




Set KMS Host

cscript slmgr.vbs /skms KMS.FQDN.local:1688



Activate Product

cscript slmgr.vbs /ato



Show Pop-up message OSD TS

PowerShell.exe -command “& { $ReturnCode = (New-Object -COMobject\”NO OSDprocessorArchitecture defined. Device ‘ll be formated, but no OS ‘ll be installed!\”,0,\”Warning\”,0x00040016); eXit $ReturnCode}”

Test Step – Check if OS Architecture is defined!

Tasksequence variable bij options


PowerShell.exe -ExecutionPolicy ByPass -Command “& { (New-Object -COMobject\”Entered a OSDTestStep, OSDTestRun is activated. Press OK to Continue. \”,0,\”Information\”,0x00040041); eXit $ReturnCode}”​

DISM: disable features


DISM /online /Disable-Feature /FeatureName:MediaCenter /Quiet /NoRestart

write-host “Successfully removed Media Center”

DISM /online /Disable-Feature /FeatureName:FaxServicesClientPackage /Quiet /NoRestart

write-host “Successfully removed Windows Fax and Scan”

DISM /online /Disable-Feature /FeatureName:OpticalMediaDisc /Quiet /NoRestart

write-host “Successfully removed Windows DVD Maker”

Prompt for Computer Name during SCCM OSD

With this method you don’t have to import a computer in SCCM 2012 with the MAC-Address.

Just start the tasksequence as an unknown computer …

To do this, complete the following steps, if you need any assistance, just post a comment at the bottom of this post.

Open your Configuration Manager console and go to the Assets and Compliance Workspace and then click on Device Collections.

Right click on the collection you want to deploy the OS to then click Properties (for this guide I’m using All Unknown Computers). You then need to click on the Collection Variables tab.

Click on the new button as circled below:

In the variable name type OSDCOMPUTERNAME and leave the value areas blank and then click ok.

Once you have this collection variable in your collection property settings, you can then deploy your OSD task sequence to this collection and you will be prompted to enter your computer name.

– See more at:


This task sequence variable can be used to configure a post action for a task sequence. To configure this, follow the next steps:

  • Open a task sequence in the Task Sequence Editor.
  • Add a Set Task Sequence Variable –step to the task sequence.
  • Fill in as Task Sequence Variable SMSTSPostAction and, in this example, as Valuecmd /c shutdown /s /t 0 /f.
  • Close the Task Sequence Editor.

Win 8.1 OSD with Language Packs

Apply Operating System English
Apply Operating System French
Apply Operating System Dutch
Use an unattended or Sysprep answer file
-> PKG_Win8.1_Unattend_NL
—> Unattend.xml

Apply Language EN (OSLanguage equals “EN”)
Apply Language FR (OSLanguage equals “FR”)
Apply Language NL (OSLanguage equals “NL”)
-> Apply NL Language Pack
—> cmd /c dism.exe /online /add-package /
—> Package: PKG_Microsoft_LanguagePack_Win8.1_01.00_NL ->
-> BCDEdit to NL
—> cmd /c bcdedit /set {current} locale nl-NL
-> BCDBoot to NL
—> cmd /c bcdboot %WinDir% /l nl-NL
-> Remove EN-US
—> cmd /c reg delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MUI\UILanguages\en-US /f
-> Restart Computer

Transform AD User Group to Device Collection


The AD Computer object must fill in the ManagedBy field with the Primary User

The AD User must be added to a AD User Group


System Discovery has to be extended with the ManagedBy field

User Discovery has to be extended with the Distinguishedname field

SCCM Collection Query:

from SMS_R_System where SMS_R_System.managedBy in (select
SMS_R_User.distinguishedName from SMS_R_User where SMS_R_User.UserGroupName =
“DOMAIN\\GG_SDC_Manufact_App_11.0_01.01_EN_INSTALL”) order by