Blog Image

Blog - Dries Willems - Freelance IT Consultant

About the blog

The main reason I use this blog, is to help myself tackling similar issues. You can see this as a very small online documentation library.
Also it is useful for others who experience the same issues.

Collection query Model

SCCM Posted on Thu, April 25, 2019 10:19:08

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

SCCM Posted on Tue, March 19, 2019 09:44:42

Dell Command Configure 3.2.0.209:
————————————————————–
HAPIInstall.cmd:

@echo off

if defined programfiles(x86) (

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

) else (

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

)
————————————————————–
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 4.0.15.1:
————————————————————–
BiosConfigUtility64.exe /setvalue:”Boot Mode”,”UEFI Native (Without CSM)”
————————————————————–
BCU.cmd /setvalue:”Boot Mode”,”UEFI Hybrid (With CSM)”
————————————————————–
BCU.cmd:

@ECHO OFF

set cmdline=%*

ECHO == Seting BIOS Settings ==

REM Determine Arch

IF “%PROCESSOR_ARCHITECTURE%” == “AMD64” GOTO :X64

GOTO X86

:X64

SET BCU=”BiosConfigUtility64.exe”

GOTO RunBCU

:X86

SET BCU=”BiosConfigUtility.exe”

GOTO RunBCU

:RunBCU

ECHO –Running command %BCU% %CMDLINE%

%BCU% %CMDLINE%

EXIT /B %errorlevel%



Use Legalnoticecaption for OSD Failure message

SCCM Posted on Tue, March 19, 2019 09:32:39

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



GetLocalGroupsSID

Scripting Posted on Mon, December 10, 2018 14:25:55

$computerName = Read-Host ‘Enter computer name or press <Enter> for localhost’

$List = @{}

if ($computerName -eq “”) {$computerName = “$env:computername”}

$computer = [ADSI]”WinNT://$computerName,computer”

$Users = $computer.psbase.Children | Where-Object { $_.psbase.schemaclassname -eq ‘group’ }

foreach ($i in $Users)

{$objUser = New-Object System.Security.Principal.NTAccount($i.Name)

$strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier])

$list[$i.Name[0]] = $strSid.Value

}

$list | ft



Remove default Apps from Xiaomi Pocophone F1

Problem solver Posted on Thu, December 06, 2018 20:38:33

Before you proceed, please install a launcher such as Nova, since we are removing Poco launcher that is installed by default.

1. You will need to install Minimal ADB fastboot 1.4.3 https://androidfilehost.com/?fid=962187416754459552

2. Open Command prompt as an Administrator

3. In your phone, go to about phone and click 10 times on MIUI version (For POCO)

4. You will be granted developer permission

5. Go to settings -> additional settings -> developer options and enable “USB Debugging”

6. Connect Poco F1 to your Computer

7. In CMD type “adb devices”

8. In your phone, you will have a popup window and click “OK”

9. In CMD type “adb shell”

10. Paste the commands below to remove the bloatware

pm uninstall -k –user 0 com.miui.analytics

pm uninstall -k –user 0 com.android.egg

pm uninstall -k –user 0 com.mi.android.globalpersonalassistant

pm uninstall -k –user 0 com.xiaomi.mipicks

pm uninstall -k –user 0 com.miui.audioeffect

pm uninstall -k –user 0 com.miui.backup

pm uninstall -k –user 0 com.android.bookmarkprovider

pm uninstall -k –user 0 com.android.browser

pm uninstall -k –user 0 com.miui.calculator

pm uninstall -k –user 0 com.android.calendar

pm uninstall -k –user 0 com.android.chrome

pm uninstall -k –user 0 com.miui.cleanmaster

pm uninstall -k –user 0 com.miui.cloudservice.sysbase

pm uninstall -k –user 0 com.mfashiongallery.emag

pm uninstall -k –user 0 com.mi.global.bbs.overlay

pm uninstall -k –user 0 com.miui.miwallpaper

pm uninstall -k –user 0 com.miui.translation.kingsoft

pm uninstall -k –user 0 com.miui.translation.youdao

pm uninstall -k –user 0 com.miui.translationservice

pm uninstall -k –user 0 com.miui.translation.youdao

pm uninstall -k –user 0 com.miui.translationservice

pm uninstall -k –user 0 com.miui.videoplayer.overlay

pm uninstall -k –user 0 com.xiaomi.joyose

pm uninstall -k –user 0 com.xiaomi.micloud.sdk

pm uninstall -k –user 0 com.xiaomi.midrop.overlay

pm uninstall -k –user 0 com.mi.global.bbs

pm uninstall -k –user 0 com.miui.compass

pm uninstall -k –user 0 com.eterno

pm uninstall -k –user 0 com.android.bips

pm uninstall -k –user 0 com.google.android.apps.docs

pm uninstall -k –user 0 com.xiaomi.midrop

pm uninstall -k –user 0 com.google.android.apps.tachyon

pm uninstall -k –user 0 com.microsoft.office.excel

pm uninstall -k –user 0 com.facebook.katana

pm uninstall -k –user 0 com.facebook.system

pm uninstall -k –user 0 com.facebook.appmanager

pm uninstall -k –user 0 com.facebook.services

pm uninstall -k –user 0 com.miui.bugreport

pm uninstall -k –user 0 com.android.documentsui

pm uninstall -k –user 0 com.miui.gallery

pm uninstall -k –user 0 com.miui.fm

pm uninstall -k –user 0 com.xiaomi.glgm

pm uninstall -k –user 0 com.google.android.gm

pm uninstall -k –user 0 com.google.android.videos

pm uninstall -k –user 0 com.google.android.music

pm uninstall -k –user 0 com.google.android.tts

pm uninstall -k –user 0 com.miui.klo.bugreport

pm uninstall -k –user 0 com.android.wallpaper.livepicker

pm uninstall -k –user 0 com.miui.cloudservice

pm uninstall -k –user 0 com.miui.cloudbackup

pm uninstall -k –user 0 com.xiaomi.payment

pm uninstall -k –user 0 com.xiaomi.mirecycle

pm uninstall -k –user 0 com.miui.virtualsim

pm uninstall -k –user 0 com.mi.global.shop

pm uninstall -k –user 0 com.miui.micloudsync

pm uninstall -k –user 0 com.mipay.wallet.in

pm uninstall -k –user 0 com.mi.webkit.core

pm uninstall -k –user 0 com.android.mms

pm uninstall -k –user 0 com.android.mms.service

pm uninstall -k –user 0 com.miui.player

pm uninstall -k –user 0 com.netflix.mediaclient

pm uninstall -k –user 0 com.mi.globalTrendNews

pm uninstall -k –user 0 com.miui.notes

pm uninstall -k –user 0 com.microsoft.office.outlook

pm uninstall -k –user 0 com.netflix.partner.activation

pm uninstall -k –user 0 com.phonepe.app

pm uninstall -k –user 0 com.android.dreams.phototable

pm uninstall -k –user 0 com.google.android.apps.photos

pm uninstall -k –user 0 com.mi.android.globallauncher

pm uninstall -k –user 0 com.microsoft.office.powerpoint

pm uninstall -k –user 0 com.android.printspooler

pm uninstall -k –user 0 com.google.android.printservice.recommendation

pm uninstall -k –user 0 com.miui.hybrid

pm uninstall -k –user 0 com.android.soundrecorder

pm uninstall -k –user 0 com.xiaomi.scanner

pm uninstall -k –user 0 com.miui.screenrecorder

pm uninstall -k –user 0 com.miui.touchassistant

pm uninstall -k –user 0 com.xiaomi.oversea.ecom

pm uninstall -k –user 0 com.skype.m2

pm uninstall -k –user 0 com.google.android.marvin.talkback

pm uninstall -k –user 0 com.UCMobile.intl

pm uninstall -k –user 0 com.miui.videoplayer

pm uninstall -k –user 0 com.miui.vsimcore

pm uninstall -k –user 0 com.miui.android.fashiongallery

pm uninstall -k –user 0 com.miui.weather2

pm uninstall -k –user 0 com.miui.providers.weather

pm uninstall -k –user 0 com.microsoft.office.word

pm uninstall -k –user 0 com.miui.yellowpage

pm uninstall -k –user 0 com.xiaomi.bttester

pm uninstall -k –user 0 com.miui.cit

pm uninstall -k –user 0 com.miui.qr

pm uninstall -k –user 0 com.miui.antispam

pm uninstall -k –user 0 com.milink.service

pm uninstall -k –user 0 com.android.wallpaperbackup

pm uninstall -k –user 0 com.android.wallpapercropper

Exit

https://forum.xda-developers.com/poco-f1/how-to/bloat-poco-f1-tested-t3836457



Send Ctrl+Alt+Del to nested remote desktop session

IT Posted on Thu, November 29, 2018 12:30:44

Send Ctrl+Alt+Del to nested RDP session

Start Run

C:\Windows\explorer.exe shell:::{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}



Powershell – Get VM Names, Serial Number, Bios UUID

Scripting Posted on Sun, November 11, 2018 13:47:03

Get-WmiObject -Namespace root\virtualization\v2 -class Msvm_VirtualSystemSettingData | select ElementName, BIOSSerialNumber, BIOSGUID | Sort-Object -Property ElementName



Run Boot media without “Press any key to boot from…” message

IT Posted on Mon, October 15, 2018 16:50:06

If it is a traditional PC BIOS then the ISO uses the El Torito boot code (etfsboot.com). In this case deleting \boot\bootfix.bin will work.

If it is an EFI BIOS then the ISO should use EFI boot code (efisys.bin).
There is also a efisys_noprompt.bin boot code file that can be used when creating the ISO for EFI systems.
Use that file instead if you want to eliminate the prompt.

Microsoft Technet article: https://technet.microsoft.com/en-us/library/dd744321(WS.10).aspx

————————-

Steps:

Download Windows ADK
Install Deployment Tools

Copy original boot media iso to C:\Temp\NoPrompt
Copy oscdimg.exe, efisys_noprompt.bin and etfsboot.com to C:\Temp\NoPrompt

Run powershellscript below to generate noprompt boot media

—————

## variables ##
$sworkspace = “C:\Temp\NoPrompt\extractedISO”

# NEW ISO
$smynewiso=”C:\Temp\NoPrompt\pd_x64_1803.0.noprompt.iso”

# OLD ISO
$stheiso=”C:\Temp\NoPrompt\pd_x64_1803.0.iso”

$setfsboot=”C:\Temp\NoPrompt\etfsboot.com”
$sefisys =”C:\Temp\NoPrompt\efisys_noprompt.bin”
$soscdimg = “C:\Temp\NoPrompt\oscdimg.exe”

## start script ##
# mount the ISO
$mount = mount-diskimage -imagepath $stheiso -passthru

# get the drive letter assigned to the iso.
$drive = ($mount | get-volume).driveletter + ‘:’

# copy the existing iso to the temporary folder.
copy-item $drive $sworkspace -force -recurse

# remove the read-only attribute from the extracted files.
get-childitem $sworkspace -recurse | %{ if (! $_.psiscontainer) { $_.isreadonly = $false } }

# Create a bootable WinPE ISO file (remove the “Press any button key..” message)
Copy-Item -Path $setfsboot -Destination “$sworkspace\boot” –Recurse -Force
Copy-Item -Path $sefisys -Destination “$sworkspace\EFI\Microsoft\Boot” –Recurse -Force

# recompile the files to an ISO
# This is the part from Johan Arwidmark’s WinPE creation script:
$Proc = $null
$Proc = Start-Process -FilePath “$soscdimg” “-o -u2 -udfver102 -bootdata:2#p0,eb$setfsboot#pEF,e,b$sefisys $sworkspace $smynewiso” -PassThru -Wait -NoNewWindow

if($Proc.ExitCode -ne 0)
{
Throw “Failed to generate ISO with exitcode: $($Proc.ExitCode)”
}

# remove the extracted content.
remove-item $sworkspace -recurse -force

# dismount the iso.
Dismount-DiskImage -ImagePath “$stheiso”

—————

https://www.exitcodezero.ch/2017/12/17/boot-image-without-press-any-key-to-boot-from-message/



Automatically Backup MySQL Databases on Windows

IT Posted on Mon, September 17, 2018 11:46:39

Unlike on Linux, when MySQL is running on Windows, most of sys-admins including myself 🙂 found that backup MySQL Databases on Windows is little bit hard. When trying to automate it, then it would definitely become challenge . However there are lots of free and commercial tools are available to automate MySQL backup process on windows. Here we are going to discus how to achieve same using simple windows batch script. Later we discuss automate the batch script using Windows task scheduler

01) Create batch file

Open notepad and save following script as batch file (.bat) and make sure to change all SET parameters as you need. If you install XAMPP then mysqldump.exe location would be similar as below otherwise you need to change it.

@echo off

For /f “tokens=2-4 delims=/ ” %%a in (‘date /t’) do (set mydate=%%c-%%a-%%b)

For /f “tokens=1-2 delims=/:” %%a in (“%TIME%”) do (set mytime=%%a%%b)

SET backupdir=C:\xampp\htdocs\backup

SET mysqlusername=your_user

SET mysqlpassword=your_pass

SET database=database_name

C:\xampp\mysql\bin\mysqldump.exe -u %mysqlusername% -p%mysqlpassword% -v %database% > %backupdir%\%database%_%mydate%_%mytime%_.sql

02) Automate the MySQL Backup process

i) Open task scheduler

Open a command prompt. To open a command prompt, click Start , click All Programs , click Accessories , and then click Command Prompt .

At the command prompt, type Taskschd.msc .

For alternative options refer this :- https://technet.microsoft.com/en-us/library/cc721931.aspx

ii) Create New Task

Task Scheduler – Create Task

Click on “Create Task…” from right hand side. it will open up “create task” sub windows

please make sure to select “Run whether user is logged on or not” and tick “Run with highest privileges“. You may can change user but

recommend to select user with admin privileges , later you may need to provide credentials of that user.

iii) Schedule the time

From “Triggers” tab select how often back process should happen and it’s time

iv) Set backup process script

From the “Actions” tab select previously saved bat file.

v) Click “OK” and save the task

https://www.tectut.com/2016/04/automatically-backup-mysql-databases-on-windows/



Disk2VHD on a Hyper-V Generation 2 VM results in an unbootable VHDX

IT Posted on Fri, July 20, 2018 10:57:48

First of all create a new generation 2 VM that we’ll use with our new VHDX we created using Disk2VHD.
Don’t create a new vdhx but select to use an existing one and point it to the one we just created with Disk2VHD.
Rename it if needed to something more suitable.

Don’t boot the VM but add a DVD and attach the Windows Server ISO of the version your vhdx contains to the DVD

diskpart

lis disk

lis vol

select volume 3

assign letter L:

FORMAT FS=FAT32 LABEL=”BOOT”

exit

bcdboot C:\Windows /s L: /f UEFI

Disk2VHD on a Generation 2 VM results in an unbootable VHDX

Windows 10 bootrec /fixboot access is denied

https://answers.microsoft.com/en-us/windows/forum/windows_10-performance/windows-10-bootrec-fixboot-access-is-denied/747c4180-7ff3-4bc2-b6cc-81e572d546df?auth=1



Redistribute failed packages

SCCM Posted on Wed, June 06, 2018 18:30:01

# 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.”

}

else

{

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

}

if ($FailedPackages)

{

foreach ($FailedPackage in $FailedPackages)

{

try

{

$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)”

}

catch

{

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

write-host $Error

}

}

}

https://social.technet.microsoft.com/Forums/office/en-US/36d083ef-6310-4d64-b4a7-031ee96a9d2f/sccm-2012-powershell-redistribute-failed-packages?forum=configmanagersdk



Windows 10 V1803 update creates a new OEM Partition

IT Posted on Mon, May 07, 2018 11:53:32

Some people notice after upgrading to Windows 10 April Update, that there is a new partition (recovery partition with Windows PE). Due to the fact, that a drive letter is assigned, the logical drive will be shown in explorer. And Windows 10 starts with annoying notifications, that the disk is full. This forum post describes the situation:

Disk management is failing

The first idea many users have is to remove the drive letter from the disk management partition. If you want to use Disk Management to fix the issue and remove the drive letter from the partition, you will fail in most cases. The context menu does not support commands on this recovery partition.

Open the command prompt window with administrator privileges

diskpart

list volume

select volume <number of your volume>

remove letter=<drive letter of your volume>

exit

( not able to remove letter from drive windows 10 1803 )

Windows 10 V1803 update creates a new OEM Partition



AD: Simple count users in an OU

IT Posted on Sun, April 15, 2018 14:39:10

(Get-ADUser -Filter * -SearchBase “ou=Users,ou=London.UK,ou=EMEA,ou=Divisions,dc=bla,dc=com” -server “bla.com”).count



Run Hyper-V in a Virtual Machine with Nested Virtualization – Inception

IT Posted on Tue, February 06, 2018 14:36:19

Prerequisites

The Hyper-V host and guest must both be Windows Server 2016/Windows 10 Anniversary Update or later.

VM configuration version 8.0 or greater.

An Intel processor with VT-x and EPT technology — nesting is currently Intel-only.

There are some differences with virtual networking for second-level virtual machines. See “Nested Virtual Machine Networking”.

Configure Nested Virtualization

Create a virtual machine.

While the virtual machine is in the OFF state, run the following command on the physical Hyper-V host.
This enables nested virtualization for the virtual machine.

Get-VM

copy VMName

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

Start the virtual machine.

Install Hyper-V within the virtual machine, just like you would for a physical server. For more information on installing Hyper-V see, Install Hyper-V.

https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/nested-virtualization



Hyper-V VM Scripts

Scripting Posted on Thu, February 01, 2018 14:01:23

<#

ImportHyperVVM.ps1

Dries Willems

03/12/2014

#>

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All -NoRestart

Restart-Computer -Wait -For PowerShell -Timeout 600 -Delay 2

Import-Module Hyper-V

$ethernet = Get-NetAdapter -Name ethernet

$wifi = Get-NetAdapter -Name wi-fi

New-VMSwitch -Name EthernetExternalSwitch -NetAdapterName $ethernet.Name -AllowManagementOS $true -Notes ‘Parent OS, VMs, LAN’

New-VMSwitch -Name WiFiExternalSwitch -NetAdapterName $wifi.Name -AllowManagementOS $true -Notes ‘Parent OS, VMs, wifi’

Copy-Item * C:\VM

Import-VM -Path ‘C:\VM\Cobra\Virtual Machines\6FAEE0C5-7422-45BD-A915-AA3C3A5D06A7.XML’

$OldHostname = Get-WmiObject win32_computersystem | select-object -expandproperty name

$NewHostname = $OldHostname + “VM”

Rename-VM Cobra $NewHostname

Start-VM $NewHostname

———————————————————————————————

<#

RenameStartVM.ps1

Dries Willems

03/12/2014

#>

$OldHostname = Get-WmiObject win32_computersystem | select-object -expandproperty name

$NewHostname = $OldHostname + “VM”

Rename-VM Cobra $NewHostname

Start-VM $NewHostname

———————————————————————————————

<#

CreateVSwitchImportRenameStartCobra.ps1

Dries Willems

03/12/2014

#>

Import-Module Hyper-V

#Create Virtual Switch

$ethernet = Get-NetAdapter -Name ethernet

$wifi = Get-NetAdapter -Name wi-fi

New-VMSwitch -Name EthernetExternalSwitch -NetAdapterName $ethernet.Name -AllowManagementOS $true -Notes ‘Parent OS, VMs, LAN’

New-VMSwitch -Name WiFiExternalSwitch -NetAdapterName $wifi.Name -AllowManagementOS $true -Notes ‘Parent OS, VMs, wifi’

#Import VM

Import-VM -Path ‘C:\VM\Cobra\Virtual Machines\8F300942-505B-41C0-8644-B46321581214.XML’

#Rename VM & Start

$OldHostname = Get-WmiObject win32_computersystem | select-object -expandproperty name

$NewHostname = $OldHostname + “VM”

Rename-VM Cobra $NewHostname

Start-VM $NewHostname

——————————————————————————————–Cobra.bat

Powershell.exe -executionpolicy bypass -File .\CreateVSwitchImportRenameStartCobra.ps1

xcopy “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Hyper-V Management Tools\VMConnect.lnk” “C:\Users\Public\Desktop\Hyper-V Virtual Machine Connection.lnk”* /I /S /Y /C /R



Secure Password with PowerShell

IT Posted on Tue, January 23, 2018 11:32:47

Command:
(Get-Credential).Password | ConvertFrom-SecureString | Out-File “C:\Temp\ABC_A1000001_PW.txt”

Script:

$username = “ABC\A1000001”

$password = Get-Content ‘\\server.domain.xyz\Scripts\Migration\ABC_A1000001_PW.txt’ | ConvertTo-SecureString

$cred = new-object -typename System.Management.Automation.PSCredential `

-argumentlist $username, $password



Windows 10: Default Start Menu Layout

IT Posted on Thu, January 11, 2018 14:27:22

The current Start Menu after a successful OSD looked a bit messy:

Software that is not installed on the PC doesn’t show up on the Start Menu. (We won’t see any “ghost” tiles or …)

Once they install for example Google Chrome or Office 2016, it will show up automatically on the Start Menu.

The Start Menu is also fully customizable for the end user.

They can move/remove/add everything they want.

The initial Start Menu is just a base where they can customize it to their own desire.

The Start Menu where the default xml is exported from:

Tasksequence step:

Package Content:


StartMenu.xml:
Open Powershell
Export-Startlayout –path C:\Windows\Temp\Startmenu.xml

ImportW10Layout.ps1:
Import-StartLayout -LayoutPath $PSScriptRoot\StartMenu.xml -MountPath $env:SystemDrive\
Copy-Item -Path $PSScriptRoot’\Internet Explorer.lnk’ -Destination $env:SystemDrive’\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories’

http://ccmexec.com/2015/09/customizing-the-windows-10-start-menu-and-add-ie-shortcut-during-osd/



Remove default apps in Windows 10

IT Posted on Wed, July 26, 2017 11:23:56

Remove 3D Builder, Alarms and Clock, Calendar and Mail, Contact Support, Cortana, Get Office, Get Skype, Groove Music, Maps, Microsoft Edge, Money, Movies & TV, News, OneNote, Candy Crush, Get Asphalt, People, Phone Companion, Twitter, Sports, Voice Recorder, Weather and XBOX.

Get-AppXPackage | where-object {$_.name –notlike “*store*”} | Remove-AppxPackage



Install Boot Camp on a old (not supported) Mac running Windows 10 Creators Update

IT Posted on Mon, May 08, 2017 13:17:34


Error: This version of bootcamp is not intended for this computer model.

Download Orca or InstEd It and open the BootCamp/Drivers/Apple/BootCamp.msi file using this software.

Find the table called LaunchCondition and select Drop table.

Save the file and run the BootCamp.msi from within Windows and it should start installing the drivers!

Reboot when prompted and you should be all set!



Documenting your Task Sequences Automagically (Update – v2)

SCCM Posted on Wed, May 03, 2017 15:32:38

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.

https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/6127/00/00/03/20/49/89/tsDocumentorv2.xsl

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.

tsDocumentorv2.xsl

https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/6127/00/00/03/20/49/89/tsDocumentorv2.xsl

https://blogs.technet.microsoft.com/deploymentguys/2009/02/20/documenting-your-task-sequences-automagically-update-v2/



OnePlus Reinstall OS with sideloader abd

Problem solver Posted on Thu, March 09, 2017 14:06:58

Recover Solution #1 (Wipe cache, this will clear app setting data but will retain user data)

Go to recovery by holding power button + volume down

Choose English

Choose ‘Wipe data and cache’

Choose ‘wipe cache’ (This will only clear app settings data, other data on the internal storage will not be erased)

Choose ‘Yes’

Choose ‘Reboot’

Solution #2 (Wipe data and cache, this will clear app setting data and erase user data)

Go to recovery by holding power button + volume down

Choose English

Choose ‘Wipe data and cache’

Choose ‘Wipe data and cache’ (this will clear app settings data and erase internal storage data)

Choose ‘Yes’

Choose ‘Reboot’

Solution #3 (Adb sideload ROM file)

Download vx.y.z ROM from OnePlus support website (http://downloads.oneplus.net)

Turn off device and boot into recovery mode (By holding power button + volume down)

Choose English option

Choose Install from USB option in the recovery screen

Tap OK button.

A screen with “You are in sideload mode” will be displayed

Connect your device to PC (PC / Mac must have adb pre-installed)

Run the following command

For windows: “adb sideload <filename>”

For Mac: “./adb sideload <filename>”



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

SCCM Posted on Wed, February 22, 2017 15:10:18

$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}

If
($ccmExecutionRequestEx -ne $null)

{

$ccmExecutionRequestEx | Remove-WmiObject

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

Restart-Service -Name CcmExec -Force

}

}



Hyper-V Manager: Access Denied. Unable to establish communication between … and …

IT Posted on Mon, December 12, 2016 18:27:44

Virtual Machines

Access denied. Unable to establish communication between ‘Hyper-V Server’ and ‘Hyper-V Manager’.

This is puzzling since the workstation has been connected to this particular Hyper-V server many times using other network profiles. The profile we created for the Microsoft folks was seemingly giving us the connection issue.

The fix took a bit of searching to find and needed to be accomplished on the Windows Vista system where the Hyper-V Manager was installed:

Close the Hyper-V Manager

C:\Windows\SysWOW64\dcomcnfg.exe

Right click on dcomcnfg and Run As Administrator.

Authenticate with the local admin credentials if UAC prompts for credentials, or
continue if it does not.

Open the Component Services node, then the Computers node, then right click on My Computer and click on Properties.

Click on the COM Security tab.

Click the Edit Limits button under Access Permissions.

Enable Remote Access for Anonymous Logon

Click Apply and OK.

Close the Component Services console and the Windows Explorer window.

Start the Hyper-V Manager and continue through the UAC.

The virtual machines, if any, will show up in the Hyper-V Manager console after that.

http://blog.mpecsinc.ca/2009/06/hyper-v-error-access-denied-unable-to.html



Clear the cache when using 1E Nomad

SCCM Posted on Wed, December 07, 2016 21:43:31

cachecleaner -deleteall -force=3



Install Drupal core with theme/Composer/Git/Commerce on your localhost

Drupal Posted on Tue, November 22, 2016 17:51:17

Install XAMPP

https://www.apachefriends.org/index.html

Select Apache and MySQL when installing

Config Apache -> Edit php.ini
upload_max_filesize=6M

Create DB utf8_general_ci + Import sql db
Create User & assign permissions on DB

——————————————————-

Install Drupal 8.x

1. Unzip the Startup Growth Drupal theme package.

2. Locate the [site]/[d8] directory and upload its content to your

server. This directory includes Drupal core and all of the

required modules that are used in the theme. If you wish to

install the theme in your root directory (often called the

“/public_html/” directory), simply place all the extracted

files and folders into this directory. Place all files in a

sub-directory, if you want the theme installed in a sub-directory

of your website.

3. (important) Create the MySQL database. Make a note of the complete

database name. You will need your database username and password

during the first couple of steps of your theme installation.

4. Import the “[site]/[d8]/[_data]/db_instance.sql” file in your newply

created MySQL database.

5. Start the Drupal installation wizard by pointing your browser to the

recently created folder, in your Apache server path.

6. Continue the installation by selecting the “Standard” installation profile.

7. Enter your recently created database information. This includes the database name

and credentials (username/password) you have chosen when creating it.

8. The installation wizard will recognise that you are using an already populated

database and will inform you accordingly. At the same time, the wizard should

create all the necessary files your Drupal site needs in order to work properly on

your server.

9. You are done. Click on the “visit existing site” link, to visit your new site.

10. Once you are done with the above, please login to this site through the /user/login url

11. Navigate to /admin/reports/status and make sure that there are no errors regarding

the “File system” item. In case of errors please make sure to resolve those.

12. By default, our theme distribution comes with Drupal 8 caching and aggregation of JS and

CSS files, deactivated, ensuring a smoother experience during any technical work you

will need to do post-installation.

Either right after installation, or when you finish building your Drupal 8 site using

this theme, it is recommended to activate Drupal caching and aggregation of CSS and

JS files, for better performance.

To do so, navigate to /admin/config/development/performance and enable caching

(default option: 15 min) as well as the “Aggregate CSS files” and

“Aggregate JavaScript files” options.

——————————————————-

Install Composer:

https://getcomposer.org/Composer-Setup.exe
https://getcomposer.org/doc/00-intro.md#manual-installation

Close all browser – and explorer windows

——————————————————-

Install Git

https://www.drupal.org/documentation/git/install

——————————————————-

Install DrupalConsole

https://github.com/hechoendrupal/DrupalConsole/#download-using-drupalcomposer

——————————————————-

Install Commerce:

Open XAMPP Shell
CD C:\xampp\htdocs\d8

composer config repositories.drupal composer https://packages.drupal.org/8

composer require “drupal/commerce 2.x-dev”

drupal module:install commerce_product commerce_checkout commerce_cart commerce_tax



Query BIOS Versions

SQL Posted on Wed, November 02, 2016 19:02:07

SELECT CompName.Name0 as ‘Computer Name’, CompSys.Manufacturer0 as ‘OEM’, CompSys.model0 as ‘Model’, BIOS.SMBIOSBIOSVERSION0 as ‘BIOSVersion’, BIOS.ReleaseDate0 as ‘Release Date’

FROM V_R_System as Sys

LEFT JOIN V_GS_PC_BIOS as BIOS on Sys.resourceid = BIOS.resourceid

LEFT JOIN V_GS_COMPUTER_SYSTEM as CompSys on Sys.resourceid = CompSys.resourceid

LEFT JOIN V_GS_SYSTEM as CompName on Sys.resourceid = CompName.resourceid

GROUP BY CompSys.Manufacturer0,CompSys.model0, BIOS.SMBIOSBIOSVersion0, CompName.Name0, BIOS.ReleaseDate0

ORDER BY CompSys.Model0, BIOS.SMBIOSBIOSVersion0



Repair SCCM Client issues

SCCM Posted on Thu, October 13, 2016 14:27:39

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.

https://gallery.technet.microsoft.com/SCCM-Client-Utility-WMI-ec270313



Troubleshoot Management Points

SCCM Posted on Tue, October 11, 2016 10:57:26

Troubleshooting:

Invalid MP cert info; no signature

Failed to query http://… for MP location

Step 1) verify the mplist and mpcert

http://server.bla.com/sms_mp/.sms_aut?mplist

http://server.bla.com/sms_mp/.sms_aut?mpcert

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

https://technet.microsoft.com/en-us/library/Bb932118.aspx?f=255&MSPPError=-2147217396



Alternative download location for HP Softpaq’s

IT Posted on Fri, September 30, 2016 15:29:12

I’ve got some corrupt softpaq downloads using
https://ftp.hp.com/pub/caps-softpaq/cmit/HP_Driverpack_Matrix_x64.html

ftp://ftp.hp.com/pub/softpaq/sp66001-66500/

This one is working

ftp://g4u0180.houston.hp.com/ftp1/pub/softpaq/sp66001-66500/



Install Windows XP on SSD with AHCI mode

IT Posted on Sun, June 05, 2016 17:06:52

Install first Windows XP 32bit on the SSD with IDE mode enabled.

Download Intel® Matrix Storage Manager

IATA89CD.exe

https://downloadcenter.intel.com/download/17882/Intel-Matrix-Storage-Manager

Open CMD
Navigate to IATA89CD.exe with cd

Extract:
IATA89CD.exe -a

Navigate to

C:\Program Files\Intel\Intel Matrix Storage Manager\winall\Driver

Copy/paste all files from that folder into C:\WINDOWS\system32\drivers

Open Device Manager

Go to IDE ATA/ATAPI controllers
Rightclick to update driver on one of them

Select “Install from list or specific location”

Select “Don’t search. I will choose the driver to install”

Select “Have Disk…”

Browse to C:\WINDOWS\system32\drivers

Select iaStor.sys

Click OK

Select driver from the list

“Intel(R) ICH9M-E/M Sata AHCI Controller”

Redo these steps on other controllers until you get a BSOD.

Be sure to change the BIOS to AHCI mode when rebooting the system!

Note: Use winsetupfromusb to load the ISO to your USB Thumb drive
http://www.winsetupfromusb.com/files/download-info/winsetupfromusb-1-6-exe/

———————————

SSD Enhancements

Disabling background disk defragmentation

Key Name:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction\ Name: Enable Type: REG_SZ Value: N

Disable Background auto-layout:

Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout Value Name: EnableAutoLayout Type: REG_DWORD Value: 0

Disable update of filesystem’s “last access timestamps”

“Key Name: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem Name: NtfsDisableLastAccessUpdate Type: REG_DWORD Value: 1

Disable Prefetch

Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters Name: EnablePrefetcher Type: REG_DWORD Value: 0

Optionally: Go to the system settings and disable the swap file (pagefile) unless you are very low on system memory, and disable the system restore service unless needed. You can also move the temporary and log files directories away to non-SSD media if available, see below.

Now, close the registry editor, reboot and you are done. Easy, wasn’ t it? Remember not use defrag utilities on SSD disks! For additional details, please refer to – http://msdn.microsoft.com/en-us/library/ms912916(v=winembedded.5).aspx — Some of above information is collected from there.

Partition alignment

Align your partitions so that they start and end at 4k disk blocks. E.g. read this post on Anandtech. Any modern partition tool will do this automatically. I recommend GParted. However the Windows XP partitioner is old and will do this wrong in most cases. The reason is that modern drives, including SSDs and hard disks, operate on 4k data blocks at a time. If the partition is misaligned all partition blocks stretch across disk blocks. If a partition block is processed the drive will need to actually process two disk blocks! This slows disk operations down.

File system settings

If you format the partition, make sure to set the file system allocation block size to 4k. For XP, it is best to choose NTFS as the file system and 4096 as the Allocation Unit Size, check Quick Format, and hit “Ok”. Am I missing something crucial? Please tell me, it will be appreciated.



Where is the EndPoint setting for VM in new Azure portal?

Azure Posted on Wed, May 11, 2016 13:48:14

The endpoint settings in VM allows us to configure the incoming traffic such as remote desktop, custom http ports (Teamcity, OctpusDeploy and etc.) to VM. It was pretty easy to find that setting on old HTML5 azure portal https://manage.windowsazure.com.

VM EndPoint Setting in old Azure portal

But you can’t use the new type of VM with a resource manager on old portal so you have no choice but to use the new Azure portal https://portal.azure.com. The problem (at least for me) came when I wanted to open some ports (endpoints) on new VM via new portal. It took me a while to search for it so I thought I will share it here for those who might have same issue.

Let’s see what you will get when you create a new VM with a resource manager.

Microsoft Azure Resource Group

By default, you will get the following things when you create a VM but of course, you have an option to choose what to create or what to re-use during the setup.

Virtual machine

Network Interface

Network Security Group

Public IP Address

Virtual network

Storage Account

Choose “Network Security Group” then you will see the setting page that looks similar to Windows Advanced Firewall interface on windows server or desktop.

Azure Network Security Group

Click on “Inbound security rules”. This is where you can enable the endpoint of your new VM. Of course, you forget to open the same port in your server OS as well.

http://michaelsync.net/2015/09/28 /where-is-the-endpoint-setting-for-vm-in-new-azure-portal



Secure Delete Files Permanently with SDelete

SCCM Posted on Tue, February 09, 2016 11:14:58

Secure Delete Files Permanently with SDelete

Contents of the Software Package:

– sdelete.exe

– sdeleteEULA.reg:

————————————————-

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Sysinternals\SDelete]

“EulaAccepted”=dword:00000001

————————————————-

Tasksequence:

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

%windir%

— 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

C:\

https://technet.microsoft.com/en-us/sysinternals/sdelete.aspx



Add Packages to WinPE

SCCM Posted on Tue, February 02, 2016 15:37:47

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\WinPE-HTA.cab”

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\WinPE-WMI.cab”

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\WinPE-WMI_en-us.cab”

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\WinPE-NetFX.cab”

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\WinPE-NetFX_en-us.cab”

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\WinPE-Scripting.cab”

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\WinPE-Scripting_en-us.cab”

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\WinPE-PowerShell.cab”

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\WinPE-PowerShell_en-us.cab”

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\WinPE-StorageWMI.cab”

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\WinPE-StorageWMI_en-us.cab”

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\WinPE-DismCmdlets.cab”

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\WinPE-DismCmdlets_en-us.cab”

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

https://technet.microsoft.com/en-us/library/hh824926.aspx



Auto Apply Drivers or Apply Driver Package

SCCM Posted on Fri, January 08, 2016 16:12:01

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.

Summary

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.

Notes

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.
http://blogs.catapultsystems.com/mlist/archive/2012/10/18/auto-apply-drivers-vs-apply-driver-package-in-task-sequences/



Delegate Control Domain Join failed

SCCM Posted on Tue, December 22, 2015 15:41:44

NetpJoinDomainOnDs: Function exits with status of: 0x216d

0x216d = ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED

“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).

https://support.microsoft.com/en-us/kb/932455



Status Message Queries: Monitor Office 365 Installation

SCCM Posted on Thu, December 17, 2015 10:51:10

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

SCCM Posted on Tue, December 15, 2015 14:14:38

System.NullReferenceException

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.

https://social.technet.microsoft.com/Forums/en-US/00b7fc39-f639-48e1-ba07-0604b29e49b1/unable-to-export-task-sequence-with-dependencies-in-sccm-2012-r2-sp1?forum=configmanagerosd



Update group membership without reboot

IT Posted on Tue, December 08, 2015 13:27:43

One solution would be to reboot the computers in the environment. This would clear the Kerberos tickets from all session caches. However, rebooting a server is not always allowed in production and in some cases the server needs to be available 24×7.

klist -li 0:0x3e7 purge



Where is Tools ConfigMgr Service Manager Option in CM 2012 Console

SCCM Posted on Mon, November 16, 2015 11:05:15

Monitoring\Overview\System Status\Component Status

http://anoopcnair.com/2012/06/05/configmgr-sccm-2012-where-is-tools-configmgr-service-manager-in-cm12-console/



Tasksequence detect freespace on disk

SCCM Posted on Fri, November 13, 2015 13:28:53

WMI Query in Tasksequence

root\cimv2
Select * from Win32_LogicalDisk where name = “C:” and FREESPACE > 5368709120



Validating file permissions and getting driver attibutes takes a lot of CPU and time on SCCM 2012 R2 SP1 CU1

SCCM Posted on Tue, November 10, 2015 10:07:39

Good news, there is a hotfix available!

https://support.microsoft.com/en-us/kb/3084586



Activate Windows 10 on KMS

SCCM Posted on Wed, November 04, 2015 12:44:20


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.



Retrieve Windows 10 key after upgrade

IT Posted on Sun, November 01, 2015 18:26:06

Option Explicit

Dim objshell,path,DigitalID, Result
Set objshell = CreateObject(“WScript.Shell”)
‘Set registry key path
Path = “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\”
‘Registry key value
DigitalID = objshell.RegRead(Path & “DigitalProductId”)
Dim ProductName,ProductID,ProductKey,ProductData
‘Get ProductName, ProductID, ProductKey
ProductName = “Product Name: ” & objshell.RegRead(Path & “ProductName”)
ProductID = “Product ID: ” & objshell.RegRead(Path & “ProductID”)
ProductKey = “Installed Key: ” & ConvertToKey(DigitalID)
ProductData = ProductName & vbNewLine & ProductID & vbNewLine & ProductKey
‘Show messbox if save to a file
If vbYes = MsgBox(ProductData & vblf & vblf & “Save to a file?”, vbYesNo + vbQuestion, “BackUp Windows Key Information”) then
Save ProductData
End If

‘Convert binary to chars
Function ConvertToKey(Key)
Const KeyOffset = 52
Dim isWin8, Maps, i, j, Current, KeyOutput, Last, keypart1, insert
‘Check if OS is Windows 8
isWin8 = (Key(66) \ 6) And 1
Key(66) = (Key(66) And &HF7) Or ((isWin8 And 2) * 4)
i = 24
Maps = “BCDFGHJKMPQRTVWXY2346789”
Do
Current= 0
j = 14
Do
Current = Current* 256
Current = Key(j + KeyOffset) + Current
Key(j + KeyOffset) = (Current \ 24)
Current=Current Mod 24
j = j -1
Loop While j >= 0
i = i -1
KeyOutput = Mid(Maps,Current+ 1, 1) & KeyOutput
Last = Current
Loop While i >= 0
keypart1 = Mid(KeyOutput, 2, Last)
insert = “N”
KeyOutput = Replace(KeyOutput, keypart1, keypart1 & insert, 2, 1, 0)
If Last = 0 Then KeyOutput = insert & KeyOutput
ConvertToKey = Mid(KeyOutput, 1, 5) & “-” & Mid(KeyOutput, 6, 5) & “-” & Mid(KeyOutput, 11, 5) & “-” & Mid(KeyOutput, 16, 5) & “-” & Mid(KeyOutput, 21, 5)

End Function
‘Save data to a file
Function Save(Data)
Dim fso, fName, txt,objshell,UserName
Set objshell = CreateObject(“wscript.shell”)
‘Get current user name
UserName = objshell.ExpandEnvironmentStrings(“%UserName%”)
‘Create a text file on desktop
fName = “C:\Users\” & UserName & “\Desktop\WindowsKeyInfo.txt”
Set fso = CreateObject(“Scripting.FileSystemObject”)
Set txt = fso.CreateTextFile(fName)
txt.Writeline Data
txt.Close
End Function



Multicast: Encountered error transferring file 800705B4

SCCM Posted on Wed, October 28, 2015 15:12:17

Un-checked Allow this package to transfered via multicast at package/image properties.

Cleared SerializedMCSKey and SignedSerializedMCSKey in registry (HKLM\Software\SMS\MCS).

Unchecked enable multicast at dp properties.

Checked enable multicast at dp properties.

Checked Allow this package to transfered via multicast at package/image properties.

ConfigMgr 2012 R2 MultiCast issue smsts.log showing HRESULT=800705B4)



Remove Duplicate SSRS Folders & Solve SSRS not working issues

SCCM Posted on Tue, October 27, 2015 11:07:11

* 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: http://stackoverflow.com/questions/9178685/change-datasource-of-ssrs-report-with-powershell

# API Documentation: http://msdn.microsoft.com/en-us/library/ms165967%28v=sql.90%29.aspx

# Previous script: http://social.technet.microsoft.com/Forums/en-US/configmanagergeneral/thread/dc9aa3b4-cea9-4a07-87ca-2795a2dbc04e

######################################################################################################################################

# 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”

$foldersToDelete.Name

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…

Done!​

* Reinstalled Reporting Services Point Role

https://social.technet.microsoft.com/Forums/en-US/f6ce1fc4-fd60-4908-a308-751b2f856211/sccm-2012-sp1-evil-folders-in-reporting-services-what-are-they-and-how-to-remove-them?forum=configmanagergeneral



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

SCCM Posted on Fri, October 23, 2015 19:06:43

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:

Exist

C:\ProgramData\Oracle\Java\Settings_Java8u66_Installed.txt

Exist

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\4EA42A62D9304AC4784BF2381208660F

Exist

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\4EA42A62D9304AC4784BF2681408660F

Installing:

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

——————————————————————

AUTO_UPDATE=0

INSTALL_SILENT=1

NOSTARTMENU=1

SPONSORS=0

WEB_ANALYTICS=0

——————————————————————

deployment.properties -> Place this file under %userprofile%\appdata\locallow\Sun\Java\Deployment\deployment.properties

——————————————————————

#deployment.properties

#Fri Oct 23 18:21:40 CEST 2015

deployment.modified.timestamp=1445617300114

deployment.roaming.profile=false

deployment.security.mixcode=DISABLE

deployment.security.revocation.check=NO_CHECK

deployment.version=8

install.disable.sponsor.offers=true

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.registered=true

deployment.javaws.jre.0.platform=1.8

deployment.javaws.jre.0.osname=Windows

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

deployment.javaws.jre.0.product=1.8.0_66

deployment.javaws.jre.0.osarch=amd64

deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se

deployment.javaws.jre.0.enabled=true

deployment.javaws.jre.0.args=

——————————————————————

My blog:

http://dries.metrico.be/#post96

https://docs.oracle.com/javase/8/docs/technotes/guides/install/config.html#table_config_file_options

http://www.itninja.com/software/oracle/java-8/8-update-45

http://serverfault.com/questions/721388/java-msi-install-error-3-2147287037



Example WQL Queries for Configuration Manager

WQL/WMI Posted on Wed, October 21, 2015 15:50:37

Example: Computers that run Windows 7

Use the following query to return the NetBIOS name and operating system version of all computers that run Windows 7.

Tip: To return computers that run Windows Server 2008 R2, change %Workstation 6.1% to %Server 6.1%

SELECT *

FROM SMS_R_System

WHERE

OperatingSystemNameAndVersion LIKE ‘%Workstation 6.1’

Example: Computers with a specific software package installed

Use the following query to return the NetBIOS name of all computers that have a specific software package installed. This example displays all computers with a version of Microsoft Visio installed. Replace %Visio% with the software package you want to query for.

Tip: This query searches for the software package by using the names that are displayed in the programs list in Windows Control Panel. The term DISTINCT is used to ensure that only one result is returned per computer. The query also uses the AS term to create an alias to enhance readability of the query.

SELECT DISTINCT *

FROM SMS_R_System AS Sys

INNER JOIN SMS_G_System_ADD_REMOVE_PROGRAMS AS ARP ON

ARP.ResourceId = Sys.ResourceId

WHERE

ARP.DisplayName LIKE ‘%Visio%’

Example: Computers WITHOUT a specific software package installed

Use the following query to return the computers that do not have a specific software package installed. This example displays all computers that do not have a version of Microsoft Visio installed. Replace %Visio% with the software package you want to query for.

Tip: This query uses the ability to use sub-queries to filter results. The key is the use of the NOT IN operator is used to filter only computers not found in the sub-query (that is the query after the WHERE clause between brackets).

SELECT *

FROM SMS_R_System AS Sys

WHERE

Sys.ResourceID NOT IN

(

SELECT ResourceID

FROM SMS_G_System_Add_Remove_Programs AS ARP

WHERE ARP.DisplayName LIKE ‘%Visio%’

)

Example: Computers that are in a specific Active Directory Domain Services Organizational Unit (OU)

Use the following query to return the NetBIOS name and OU name of all computers in a specified OU. Replace the OU Name in the example with the name of the OU that you want to query for.

SELECT DISTINCT *

FROM SMS_R_System AS Sys

WHERE

Sys.SystemOUName = ‘Contoso.Domain.local/OUName’

Example: Computers with a specific NetBIOS name

Use the following query to return the NetBIOS name of all computers that begin with a specific string of characters. In this example, the query returns all computers with a NetBIOS name that begins with ABC.

SELECT DISTINCT *

FROM SMS_R_System AS Sys

WHERE

Sys.NetbiosName LIKE ‘ABC%’

Example: All computers that are laptops (method 1)

Use the following query to return the all computers that are laptops. This is achieved by finding all machines that have batteries.

This query uses hardware inventory of the Win32_Battery WMI class.

Tip: This query requires that hardware inventory be extended to include the Win32_Battery class (and at least the DeviceID property). To do this, see one of the following TechNet articles for System Center 2012 Configuration Manager This link is external to TechNet Wiki. It will open in a new window. or Configuration Manager 2007 This link is external to TechNet Wiki. It will open in a new window. .

SELECT DISTINCT *

FROM SMS_R_System AS Sys

INNER JOIN SMS_G_System_Battery AS Batt ON

Batt.ResourceId = Sys.ResourceId

WHERE

Batt.DeviceID LIKE ‘%’

Example: All computers that are laptops (method 2)

Use the following query to return the all computers that are laptops. This is achieved by determining the chassis type defined by the hardware manufacturer.

This query uses hardware inventory of the Win32_SystemEnclosure WMI class. This query identifies devices classified as ‘Laptop’ or ‘Notebook’ or ‘Portable’ – there are additional classes that a hardware vendor may choose to identify their devices. A complete list of chassis types can be found in the MSDN documentation of the Win32_SystemEnclosure class here This link is external to TechNet Wiki. It will open in a new window. .

Tip: This query uses the Configuration Manager WQL extension IN operator, which allows for case like query.

SELECT DISTINCT *

FROM SMS_R_System AS Sys

INNER JOIN SMS_G_System_System_Enclosure AS Case ON

Case.ResourceId = Sys.ResourceId

WHERE

Case.ChassisTypes IN (’10’, ‘9’, ‘8’)

Example: All computers that are virtual machines

Use the following query to return the all computers that are running virtual machines (either Microsoft or VMWare). This is achieved by determining the manufacturer of the guest’s “hardware” as reported by the virtual BIOS.

This query uses hardware inventory of the Win32_ComputerSystem WMI class. A complete list of properties can be found in the MSDN documentation of the Win32_ComputerSystem class here This link is external to TechNet Wiki. It will open in a new window. .

SELECT *

FROM SMS_R_System AS Sys

INNER JOIN SMS_G_System_Computer_System AS CompSys ON

CompSys.ResourceId = Sys.ResourceId

WHERE

(CompSys.Manufacturer = ‘Microsoft Corporation’

OR CompSys.Manufacturer = ‘VMware, Inc.’)

http://social.technet.microsoft.com/wiki/contents/articles/12050.example-wql-queries-for-configuration-manager.aspx



Windows 10: Default File Explorer view “This PC”

SCCM Posted on Fri, October 16, 2015 07:49:46

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced

LaunchTo DWORD

1 = This PC

2 = Quick access



SCCM Logs

SCCM Posted on Wed, October 07, 2015 13:54:40

https://technet.microsoft.com/en-us/library/hh427342.aspx



New installation of SCCM 2012 R2 SP1

SCCM Posted on Mon, October 05, 2015 17:31:26

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.

PS:
Don’t forget to install the latest CU1
https://support.microsoft.com/en-us/kb/3074857



Hyper-V Server 2012 R2 Explorer

IT Posted on Tue, September 22, 2015 17:41:19

Configuring the firewall

I already explained Server Core acts as a file server without installing anything. All you need to do is permit file services through the firewall. In the standard firewall configuration there’s already a pre-built exception you can enable by typing the following command:

netsh firewall set service fileandprint

https://dirteam.com/sander/2007/09/19/getting-installation-files-onto-server-core/



Versions of Microsoft products

IT Posted on Tue, September 22, 2015 16:53:06

https://buildnumbers.wordpress.com/



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

SCCM Posted on Tue, September 22, 2015 11:19:26

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)



Cannot edit the object, which is in use by …

SCCM Posted on Wed, September 09, 2015 18:03:20

Open SQL Management Studio

select * from SEDO_LockState where LockStateID <> 0

DELETE from SEDO_LockState where LockID = ‘<LockID of the record identified in the previous query>’



K1000: Installing .Net FrameWork 4.5.2 with Scripting

Dell Kace Posted on Tue, August 25, 2015 17:15:00

Verify:
1. Verify that “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full!Release” is greater than or equal to “379893”.

On Success:
1. Log “The Microsoft .NET FrameWork 4.5.2 is already installed.” to “status”.

Remediation:
1. Run the batch file “Setup” with params “”.
Setup

@echo off

NDP452-KB2901907-x86-x64-AllOS-ENU.exe /q /norestart /log C:\Temp\BL_SDS_Microsoft_.NetFrameWork_4.5.2_1.0_NL_Inst.log

if %errorlevel% == 3010 (exit /b 0) else (exit /b %errorlevel%)

Wait for completion

2. Launch “\cmd.exe /c” with params “shutdown -r -t 90 -c ”De PC zal automatisch na 90 seconden herstarten. Gelieve uw openstaande documenten te bewaren.“”.
Wait for completion
Visible

On Remediation Success:

On Remediation Failure:



Changing startup to Automatic on the SCCM Remote Control Service

SCCM Posted on Tue, August 25, 2015 14:44:52

http://ccmexec.com/2015/03/changing-startup-to-automatic-on-the-sccm-remote-control-service/



Enable dotNet 3.5 on Windows 10

IT Posted on Mon, August 17, 2015 10:28:50

Windows 10 comes with .NET framework 4.5 pre-installed, but many apps developed in Vista and Windows 7 era require the .NET framework v3.5 installed along with 4.5.

These apps will not run unless you will install the required version.

When you try to run any such app, Windows 10 will prompt you to download and install .NET framework 3.5 from the Internet.

Here is how to install it offline using DISM from Windows Kits for Windows 10.

Dism /Get-WIMInfo /WimFile:S:\Temp\install.wim

Dism /Mount-WIM /WimFile:S:\Temp\install.wim /Index:1 /MountDir:S:\Temp\offline

Dism /Image:S:\Temp\offline /Enable-Feature /FeatureName:NetFX3 /All /Source:H:\sources\sxs /LimitAccess

Dism /Image:S:\Temp\offline /Add-Package /PackagePath:S:\Temp\de-de

Dism /Image:S:\Temp\offline /Add-Package /PackagePath:S:\Temp\fr-fr

Dism /Image:S:\Temp\offline /Add-Package /PackagePath:S:\Temp\nl-nl

Dism /Unmount-WIM /MountDir:S:\Temp\offline /Commit

Dism /Cleanup-WIM



Windows failed to apply the TCPIP settings

IT Posted on Thu, August 13, 2015 12:59:30

Remove the following file”C:\Windows\System32\GroupPolicy\Machine\Registry.pol”

run gpupdate /force



Accessing HKCU and HKCR from Remote Registry

IT Posted on Mon, August 03, 2015 12:04:26

When you open registry editor and connect to a remote system, the only hives you will see are HKEY_LOCAL_MACHINE and HKEY_USERS. The other two hives, HKEY_CLASSES_ROOT and HKEY_CURRENT_USER are there too, but are under the two visible hives. So for all purposes, I am only going to explain here how to access the once that are not openly evident.

HKEY_CLASSES_ROOT

This hive is located under HKEY_LOCAL_MACHINE\SOFTWARE\Classes

HKEY_CURRENT_USER

This hive is more tricky to find because you have to correlate what the SID is to the user. This can be done by going to HKEY_USERS and parsing through each SID. Ignore the SIDs that have only 4 sets of numbers (i.e. S-1-5-18). These are system accounts. The best way I found to parse through and find who the user is is to go to HKEY_USERS\<SID>\Software\Microsoft\Windows\CurrentVersion\Run. Under this key will be a list off applications that are set to run when the system is booted up. You can look at the data field and there will usually be a few apps that will say “c:\users\<username>”, which will give away who the user of that SID is.

There is another way and that would be to remotely run a WMI query to find out who the current user is and the SID for that user.

http://mickitblog.blogspot.be/2012/03/accessing-all-hives-from-remote.html



DISM: Edit Bootimage WinPe

SCCM Posted on Mon, August 03, 2015 11:34:52

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



How to add all users in an OU to a Security Group using Get-ADUser and Add-ADGroupMember

Scripting Posted on Wed, July 01, 2015 15:46:39

Get-ADUser -SearchBase ‘OU=DEV,OU=BuitenDienst,OU=Users,OU=Moto,DC=Com’ -Filter * | ForEach-Object {Add-ADGroupMember -Identity ‘GG_SDS_DEV_Caris_ML_PROD’ -Members $_ }

http://oxfordsbsguy.com/2015/03/09/powershell-how-to-add-all-users-in-an-ou-to-a-security-group-using-get-aduser-and-add-adgroupmember/



Install Console

SCCM Posted on Thu, June 18, 2015 10:50:37

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

%ProgramFiles(x86)%\Microsoft Configuration Manager\AdminConsole\bin
Microsoft.ConfigurationManagement.exe
5.0.8239.1000



Change Statuscode 3010 to 0

Scripting Posted on Mon, June 15, 2015 15:19:33

@echo off

msiexec /I vc_red.msi TRANSFORMS=vc_red.mst /qn ALLUSERS=1 /L*v %windir%\temp\TEST_SDS_Microsoft_VC++RedistSU_2008SP1_1.0_EN_x86_Inst.log REBOOT=REALLYSUPPRESS

if %errorlevel% == 3010 (exit /b 0) else (exit /b %errorlevel%)



Can’t Delete ConfigMgr_OfflineImageServicing Folder After Failed Servicing

SCCM Posted on Tue, June 09, 2015 16:37:57

Take ownership on the last Folder

Give your account full control

Delete the folder

This does only work after you apply

dism /get-MountedWimInfo

dism /cleanup-wim



Enabling CLR Integration

SQL Posted on Tue, March 17, 2015 17:29:22

Query test
sp_configure ‘clr enabled’

Query change
sp_configure ‘show advanced options’, 1;
GO
RECONFIGURE;
GO
sp_configure ‘clr enabled’, 1;
GO
RECONFIGURE;
GO

https://msdn.microsoft.com/en-us/library/ms131048.aspx



Orchestrator Designer generates a prompt for a license key after you migrate the Orchestrator database

SCO Posted on Tue, March 17, 2015 17:04:39

When you migrate the Orchestrator database from one instance of Microsoft SQL Server to another and then try to open Orchestrator Designer in Microsoft System Center 2012 Orchestrator or in System Center 2012 R2 Orchestrator, Orchestrator Designer starts to open and then generates a prompt that indicates that the license key has expired. When you enter a valid key and then click OK, the same prompt appears.

For all the details as well as a resolution, please see the following:

KB2920037 – Orchestrator Designer generates a prompt for a license key after you migrate the Orchestrator database (http://support.microsoft.com/kb/2920037)

To resolve this issue, follow these steps:

Stop the Orchestrator Management service.

Open the Orchestrator database on the new instance of SQL Server.

Open a new query, and make sure that the Orchestrator database is selected.

Execute the following two lines on the database, one at a time:

Delete the old key:

[Microsoft.SystemCenter.Orchestrator.Cryptography].[DropOrchestratorKeys]

Create the new key:

[Microsoft.SystemCenter.Orchestrator.Cryptography].[CreateOrchestratorKeys]

Start the Orchestrator Management service.

When you now open Orchestrator Designer, you are again prompted for the key. When you enter the key, the key works as designed.

http://blogs.technet.com/b/orchestrator/archive/2014/01/09/kb-orchestrator-designer-generates-a-prompt-for-a-license-key-after-you-migrate-the-orchestrator-database.aspx



Reporting Services Site Role Setup: Instance Blank/Empty

SCCM Posted on Tue, March 17, 2015 10:55:29

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!

http://myitforum.com/myitforumwp/2012/10/10/reporting-services-site-role-setup-instance-blankempty/#



Unable to remove the Component Server Site System Role

SCCM Posted on Tue, March 17, 2015 10:27:38

Problem:

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.

Resolution:

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: http://www.faqshop.com/wp/configmgr/cm12/cm12trobshoot/cm12sitesys/unable-remove-component-server-site-system-role#sthash.VzDrv9CV.dpuf

http://www.faqshop.com/wp/configmgr-2012-unable-remove-component-server-site-system-role



OSD Deploying ConfigMgr Hotfixes

SCCM Posted on Wed, March 11, 2015 12:22:05

http://blogs.technet.com/b/configmonkey/archive/2013/11/13/deploying-configmgr-hotfixes.aspx#_Operating_System_Deployments



oobe.xml example

SCCM Posted on Wed, March 11, 2015 10:58:57

<?xml version=”1.0″ encoding=”utf-8″ ?>
<!– Oobe.xml sample file for the region: Catalonia, Spain
For more info, see Configure Oobe.xml,
http://go.microsoft.com/fwlink/?LinkId=317086 –>
<FirstExperience>
<oobe>
<oem>
<name>Fabrikam</name>
<!– Name of the manufacturer –>

<eulafilename>fabrikam_eula.rtf</eulafilename>
<!– 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 –>
</oem>

<defaults>
<!– Set the defaults for the language, location, locale, keyboard, and timezone –>
<language>1027</language>
<!– App language.
See Available Language Packs for Windows, Language decimal identifier
http://go.microsoft.com/fwlink/?LinkId=206620 –>

<location>217</location>
<!– Country or region where the PC is deployed.
See Table of Geographical Locations, Geographic location identifier (decimal)
http://go.microsoft.com/fwlink/?LinkId=141804 –>

<locale>1034</locale>
<!– PC locale. Determines sorting, time/date formatting, and keyboards/IMEs.
See Default Input Locales for Windows Language Packs, keyboard decimal identifier:
http://go.microsoft.com/fwlink/?LinkId=325349 –>

<keyboard>0000080a</keyboard>
<!–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:
http://go.microsoft.com/fwlink/p/?LinkId=262262 –>

<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 –>

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

</defaults>
</oobe>
</FirstExperience>



Performance Indicator for SSD

SCCM Posted on Fri, March 06, 2015 14:34:34

OSD Task Sequence

Run Performance Indicator
WinSAT.exe formal
%SystemRoot%\System32



Collection Query for Hostname starting with

WQL/WMI Posted on Fri, March 06, 2015 11:13:04

select * 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.Name like “ALM%”



System: Application Name & Version

WQL/WMI Posted on Thu, February 26, 2015 17:12:53

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_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like “%XXX%” and SMS_G_System_ADD_REMOVE_PROGRAMS.Version < “11.0.10” order by SMS_R_System.Name



Create RolloutFile in TaskSequence

SCCM Posted on Thu, February 26, 2015 14:02:38

copy /y NUL C:\Windows\Temp\SDT_Microsoft_Windows_10_EN_Deployed.txt >NUL



Changing the language of the SCCM Console

SCCM Posted on Mon, February 23, 2015 12:56:26

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.



Office 2013: Desktop shortcut bug

Problem solver Posted on Mon, February 23, 2015 11:38:02

When creating a desktopshortcut for Office 2013 keep the following in mind.

Use [ under Start in:

Target:

[Excel 2013]

Location:

[DesktopFolder]

Name:

Excel 2013

Start in:

[

Arguments

Shortcut
Key:

None

Run:

Normal windows



Activate Office/Windows under Task Sequence

SCCM Posted on Mon, February 23, 2015 11:18:34

Office:

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

office2013volumelicensepack_x86_en-us.exe

http://www.microsoft.com/en-us/download/details.aspx?id=35584

————

Windows:

Set KMS Host

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

C:\Windows\System32

—-

Activate Product

cscript slmgr.vbs /ato

C:\Windows\System32

—-



Show Pop-up message OSD TS

SCCM Posted on Fri, February 20, 2015 10:32:36

PowerShell.exe -command “& { $ReturnCode = (New-Object -COMobject wscript.shell).popup(\”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!

http://msdn.microsoft.com/en-us/library/ms645505(VS.85).aspx

Tasksequence variable bij options

_____

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



WinPE: Change keyboardlayout

SCCM Posted on Thu, February 19, 2015 16:17:33

Run command line

Wpeutil SetKeyboardLayout 0813:00000813

or with powershell

Set-WinUserLanguageList nl-BE

or with DISM
See other post



The software change returned error code SCCM

SCCM Posted on Mon, February 16, 2015 16:11:57

0x87D00324

This will indicate that software installation was succesfull, but detection method sucks.



SetUsersFullControl.ps1

Scripting Posted on Fri, February 13, 2015 15:03:49

$sharepath = “C:\SWL”

$Acl = Get-ACL $SharePath

$AccessRule= New-Object System.Security.AccessControl.FileSystemAccessRule(“Users”,”full”,”ContainerInherit,Objectinherit”,”none”,”Allow”)

$Acl.AddAccessRule($AccessRule)

Set-Acl $SharePath $Acl



Virtual Machine tweaks for a better performance

IT Posted on Thu, February 12, 2015 14:19:28

Over the last couple of months I gathered the following tweaks for a better performance insight the virtual machine, besides disabling / uninstalling useless services and devices:

– Disable the pre-logon screensaver:

Open Regedit

HKEY_USERS\.DEFAULT\Control Panel\Desktop

Change the value of “ScreenSaveActive” to 0.

– Disable updates of the last access time attribute for your NTFS filesystem, especially for i/o intensive vm’s this is a real boost:

Open CMD

fsutil behavior set disablelastaccess 1

– Disable all visual effects:

Properties on your desktop

Appearance -> Effects

Disable all options.

– Disable mouse pointer shadow:

Control Panel -> Mouse

Click on the tab “pointers” and switch “enable pointer shadow” off.

– Uninstall Tablet PC Components, unless this feature is needed.

– Disable IPv6, unless it is needed.

– Use the File System Utility (fsutil) command to disable the setting that keeps track of the last time a file was accessed.

For example: fsutil behavior set disablelastaccess 1

– Start the Registry Editor (regedit.exe) and change the TimeOutValue REG_DWORD in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Disk to0x000000be(190).

– Shut down the guest operating system and power off the virtual machine.

Change the virtual machine video card RAM setting to 128 MB.

Power on the virtual machine.

https://pubs.vmware.com/view-50/topic/com.vmware.view.administration.doc/GUID-E712DAE6-88DF-4208-BEFA-09513A01A26E.html

Virtual Machine tweaks for a better performance



DISM: disable features

SCCM Posted on Thu, February 12, 2015 14:15:13

OSDDisableFeatures.ps1

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”

http://tweaks.com/windows/40255/manage-windows-features-from-command-line-with-dism/



Prompt for Computer Name during SCCM OSD

SCCM Posted on Wed, February 11, 2015 11:45:45

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: http://www.techygeekshome.co.uk/2012/12/prompt-for-computer-name-during-sccm-osd.html#sthash.5fguzzbD.dpuf

http://www.techygeekshome.co.uk/2012/12/prompt-for-computer-name-during-sccm-osd.html



SMSTSPostAction

SCCM Posted on Wed, February 11, 2015 11:35:56

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.

http://www.petervanderwoude.nl/post/how-to-perform-an-action-directly-after-the-task-sequence-is-finished-with-configmgr-2012/



Detection Method for a certificate

SCCM Posted on Wed, February 11, 2015 11:35:17

HKLM\SOFTWARE\Microsoft\SystemCertificates\TrustedPublisher\Certificates\6BFF5439A57586FEF61B8D8E2194A96DD459B511



Win 8.1 OSD with Language Packs

SCCM Posted on Wed, February 04, 2015 15:05:38

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 /packagepath:lp.cab
—> Package: PKG_Microsoft_LanguagePack_Win8.1_01.00_NL -> lp.cab
-> 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



SCCM collection to list all the Laptop computers

IT Posted on Wed, January 28, 2015 17:07:42

You can identify if the computer is Laptop or Desktop based on its chassis Types.

Below are listed the Chassis types available to create SCCM collection or reports.

For Laptops Chassis Types : 8 , 9, 10, 11, 12, 14, 18, 21

For Desktop Chassis Type : 3, 4, 5, 6, 7, 15, 16

For server Chassis Type: 23

Below is the collection to list all the computers which are laptops which fall in above Chassis type. All these values are from SQL table called SMS_G_System_SYSTEM_ENCLOSURE .If you are looking to create SCCM report,you can create using Views(v_GS_SYSTEM_ENCLOSURE).

You can also replace the values with Desktop computers or servers also you can use joins to club these with AD groups for deploying the applications based on this.

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_SYSTEM_ENCLOSURE on SMS_G_System_SYSTEM_ENCLOSURE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM_ENCLOSURE.ChassisTypes in ( “8”, “9”, “10”, “11”, “12”, “14”, “18”, “21” )

Here are some sample reports/queries available which you can make use of it

http://myitforum.com/cs2/blogs/snorman/archive/2007/09/18/count-of-chassis-types-by-collection.aspx

http://wmug.co.uk/wmug/b/eskonr/archive/2010/11/16/sccm_2d00_collection_2d00_to_2d00_list_2d00_all_2d00_the_2d00_laptop_2d00_computers



MSI Products

IT Posted on Wed, January 28, 2015 11:14:22

HKEY_CLASSES_ROOT\Installer\Products

of

HKLM\Software\Classes\Installer\Products



Collection queries for SCCM 2012 R2 CU3 Update

IT Posted on Mon, January 19, 2015 17:10:44

COL_Devices_without_ClientUpdate_2012R2CU3

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 inner join SMS_G_System_SMS_ADVANCED_CLIENT_STATE on SMS_G_System_SMS_ADVANCED_CLIENT_STATE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.SystemType = “x64-based PC” and SMS_G_System_SMS_ADVANCED_CLIENT_STATE.DisplayName = “CCM Framework” and SMS_G_System_SMS_ADVANCED_CLIENT_STATE.Version >= “5.00.7958.1000” and SMS_G_System_SMS_ADVANCED_CLIENT_STATE.Version < “5.00.7958.1401”

COL_Devices_with_SCCM_Console

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_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceId = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like “%System Center 2012 R2 Configuration Manager Console%”

For 64-bit OS also use
or SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName like “%Applicationname%”



Redistribute a hidden package SCCM 2012

IT Posted on Mon, January 05, 2015 11:01:32

Redistribute a hidden package.

Apply the following powershell script

$SiteCode = “XXX”
$PackageID = “XXX00003”
$distpoints = Get-WmiObject -Namespace “root\SMS\Site_$($SiteCode)” -Query “Select * From SMS_DistributionPoint WHERE PackageID=’$PackageID'”
foreach ($dp in $distpoints)
{
$dp.RefreshNow = $true
$dp.Put()
}

https://social.technet.microsoft.com/Forums/en-US/d2e5366f-f7c3-4691-9011-ad35ed25ab74/configuration-manager-client-upgrade-package-missing?forum=configmanagerdeployment&prof=required



MDT 2013 USB Deployment

MDT Posted on Mon, December 29, 2014 15:03:04

Rules in MDT Media

–> bootstrap.ini
[Settings]
Priority=Default

[Default]
SkipBDDWelcome=YES
KeyboardLocale=080c:0000080c
KeyboardLocalePE=080c:0000080c

–> Customsettings.ini

[Settings]

Priority=Default

Properties=MyCustomProperty

[Default]

OSInstall=Y

SkipCapture=YES

SkipAdminPassword=NO

SkipProductKey=NO

BitsPerPel=32

VRefresh=60

XResolution=1366

YResolution=768

SkipBDDWelcome=YES

SkipApplications=YES

SkipAppsOnUpgrade=YES

SkipBitLocker=YES

SkipUserData=YES

UserDataLocation=NONE

SkipTaskSequence=NO

SkipComputerBackup=YES

SkipComputerName=NO

SkipDomainMembership=YES

JoinWorkgroup=WORKGROUP

SkipSummary=YES

SkipFinalSummary=YES

SkipLocaleSelection=YES

KeyboardLocale=080c:0000080c

KeyboardLocalePE=080c:0000080c

UserLocale=fr-be

UILanguage=fr-be

SkipTimeZone=Yes

TimeZoneName=Romance Standard Time

FinishAction=SHUTDOWN



SCCM 2012: Failed to get client identity (80004005)

IT Posted on Mon, December 22, 2014 15:16:20

PXE keeps rebooting after “preparing Network connection”. Errors: “reply has no message header marker”, “Failed to get client identity (80004005)”, “Failed to request for client”

OSD Boot media cannot see TS

Resolution: Set correct time in BIOS!

cmd:
date
time

http://777notes.wordpress.com/2012/10/09/sccm-2012-failed-to-get-client-identity-80004005/



Change StagingDrive Offline servicing of Operating System Images

IT Posted on Wed, December 10, 2014 17:41:44

You can keep your operating system images updated with the latest software updates from Microsoft using the offline servicing feature of Configuration Manager. Here are a few facts you may not know:

Software updates content is not retrieved over the wide area network, rather it is obtained locally from the Configuration Manager content library on the site server where offline servicing is performed. This prevents excessive network traffic during the application of updates.

You can specify to continue if an error occurs while applying the selected updates to an OS image. As a result, if some updates fail to be applied to the image, servicing will apply the remaining updates.

Upon completion of the offline servicing process, you can specify that the updated version of the OS image is automatically distributed to all distribution points where it resides.

Offline servicing stages temporary data on the site server when the process runs, and uses the drive on which Configuration Manager is installed. One common request is to configure offline servicing to use the specified drive of the site server. Let’s say you want to specify the “F:” drive for offline servicing to stage and mount the OS image and store software updates files. Here’s how to do this using the Windows Management Instrumentation Tester utility (wbemtest.exe).

Launch wbemtest.exe.

Connect to the Configuration Manager namespace on the site server. For example, if your site code is “CCP”, connect to namespace “root\sms\site_CCP”.

Next click Query, enter the following, and then click Apply:

SELECT * FROM SMS_SCI_Component WHERE SiteCode=’CCP’ AND ItemName LIKE ‘SMS_OFFLINE_SERVICING_MANAGER%’

Double-click on the result.

Double-click on the “Props” property in the list.

Click “View Embedded”.

There will be four entries returned in the list. Double-click on each to find the one where the PropertyName field is “StagingDrive”.

Change Value1 in the list to “F:” (in this example).

Click “Save Object”.

Click “Close”.

Click “Save Property”.

Click “Save Object”.

Click “Close”.

Now the next time offline servicing runs it will stage all of its files in the folder F:\ConfigMgr_OfflineImageServicing.

–Vladimir Sorokin

http://blogs.technet.com/b/configmgrteam/archive/2013/07/15/customizing-offline-servicing-of-operating-system-images.aspx



SCCM 2012 Task Sequence – Install all updates

IT Posted on Wed, December 10, 2014 17:34:32

1: Scan for updates
powershell.exe -command “([wmiclass]’root\ccm:SMS_Client’).TriggerSchedule(‘{00000000-0000-0000-0000-000000000113}’)”

2: Wait for Scan to Finish
powershell.exe -command start-sleep 500

3: Install All Updates

4: Restart Computer

Re-apply these steps 3 times



How to Update the Surface Pro 3 Firmware Offline using a USB Drive

IT Posted on Wed, December 10, 2014 15:00:13

Today’s blog post is a collaboration between our PFE group and premier support. Joao Botto (PFE), Kyle Blagg (PFE), and Scott McArthur (Support) are writing about their favorite device. You will see this post in the askpfeplat and askcore blogs.

Some of you may know that we launched Surface Pro 3 before its gigabit network adapter and Docking Station were available, and that has led to some customers experiencing issues such as:

· Slow PXE performance downloading a boot.wim

· Surface Pro 3 not charging when in docking station

Both of these issues are due to older firmware. When you unbox a Surface Pro 3, there will be newer firmware available, due to the time difference between when the device is manufactured and finally makes its way to you.

This post focuses on the Surface Pro 3, but this same process can be utilized on the Surface Pro and Surface Pro 2 (but not the Surface RT/Surface 2 devices).

If you are deploying a custom image using Microsoft Deployment Toolkit (MDT), System Center Configuration Manager, or other deployment tool you may want to address these firmware issues before you deploy your custom image. We have developed a method to use a USB Windows PE drive that automatically updates the Surface firmware when you boot with it.

Other possible workarounds, instead of using the method describe in this blog post are to have a boot.wim on a USB drive instead of PXE, or go through OOBE and immediately use Windows Update to apply the latest Surface drivers/firmware.

Introduction

Firmware updates reprogram the chips inside your device, making it better than ever before. They are shipped in what we call capsules, but they look like regular drivers:

image

If this interests you, check out the blog post from the Surface Team about how Windows Update Makes Surface Better

Before you start this recipe you will need the following ingredients:

Latest Surface Pro Firmware Updates from the driver pack

Windows Assessment and Deployment Kit (ADK), specifically the Deployment Tools and Windows PE components of this kit

A USB flash drive

IMPORTANT:

· Do not try to update the Touch Firmware using this method.

· This guidance will not work if the Surface Pro disk was formatted (and a new Operating System wasn’t loaded) or if the disk is encrypted.

· To prevent accidental device shutdown, the firmware updates will only be applied when the device has 40% or more of battery. We strongly recommend you fully charge your battery before proceeding with the firmware update.

Drivers

Extract the Surface driver pack you previously downloaded, and select the EC, SAM and UEFI firmware updates. All these firmware capsules are in the Microsoft > FW folder.

image

Copy the EC, SAM and UEFI the firmware files to a folder. In my example I called this folder Pro3 and put it in C:\SurfaceFW\Pro3

Reminder: DO NOT try to update touch firmware using this process.

image

Windows PE

From the ADK you must make sure you have installed the Deployment Tools and Windows PE:

image

From that point you will have the Deployment and Imaging Tools Environment (which is essentially a command line window with additional tools in the path). Run it as Administrator.

image

At this point you’re ready to start preparing a version of Windows PE x64 that will be used to update the firmware. It’s very important to use the x64 version since x64 UEFI isn’t able to load an x86 OS.

When you install the ADK the default folder (on a x64 install of Windows) for Windows PE is C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Pre-installation Environment

In that folder you will find the WinPE images for x86 and x64, and some scripts that make the creation of a WinPE flash drive extremely easy.

image

Change directory to this folder: cd “C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment”

From the elevated prompt you will have to start by running the first script by executing the command copype amd64 C:\WinPE_amd64 to place the original WinPE image in that folder.

Then you will use the same elevated prompt to run MakeWinPEMedia /UFD C:\WinPE_amd64 E: (the E: drive is my flash drive, which will be reformatted, and C:\WinPE_amd64 is the working folder I supplied in the previous command).

image

The first step is to create a folder (in my case c:\mount), and then mount the mount the WinPE image using this command: dism /Mount-Image /ImageFile:E:\sources\boot.wim /index:1 /MountDir:c:\mount

image

Then you should inject the firmware updates into Windows PE: dism /Image:C:\mount /Add-Driver /Driver:C:\SurfaceFW\Pro3 /Recurse

You should see all firmware updates being successfully injected.

image

Note: Make sure all three firmware updates were successfully injected into Windows PE. You should see the “The driver package was successfully installed” message like in the example above.

To unmount the WinPE image just run the following command:

dism /Unmount-Image /MountDir:C:\mount /commit

image

You can now boot to your new WinPE environment by plugging the flash drive to your new Surface Pro (while it’s turned off) and then start the device with Power + Volume Down. Keep holding the volume down button until a few seconds after your device displays the Surface logo. Once WinPE loads, you’ll see a blank screen and a command prompt will automatically process the updates.

The firmware will be updated without any user interaction and your Surface will reboot automatically when it’s done. You will then see “Please wait while we install a system update” for a few minutes and your Surface Pro 3 will reboot again when it’s ready.

If you want to validate that the update was successful you can boot into the UEFI settings (start the device by pressing Power + Volume Up) and look under device information. If you see the Asset Tag field that would indicate your UEFI firmware was updated from the version that shipped in the original image. Over time this method may not be usable for validation since at some point the image that is shipped with the device will already have this version of the firmware by default. Another option for validating firmware versions is to press Shift+F10 at the first page of the OOBE and open devmgmt.msc to check the firmware versions. Note: If you use this process to update the firmware and then goto Windows Update, you will likely see a firmware update offered. This is normal. The firmware is updated but the driver currently installed is not up to date. The offered update will install the driver that shows the updated firmware

We will be improving this process over time so look for updates to this blog for some additional features such as automatically checking for battery level and other ways to determine the firmware was updated.

Scott “I fix all Surface Issues” McArthur, Kyle “my Surfaces are on TV” Blagg, and Joao “let’s do it!” Botto

http://blogs.technet.com/b/askpfeplat/archive/2014/10/20/how-to-update-the-surface-pro-3-firmware-offline-using-a-usb-drive.aspx



Create empty file for unique driver import in SCCM 2012

IT Posted on Wed, December 10, 2014 11:27:42

By simply adding a unique text file to the driver folder it creates a different hash value and allows you to import the same driver even if the actual drivers already have been imported.

Just put the above code into a batch file at the root of your directory structure for a given model and name it for that hardware model; e.g., name it Optiplex755.bat and put it in the root of the folders housing the Optiplex 755 drivers.

—————————————–

@ECHO OFF

for /f “tokens=*” %%G IN (‘dir /ad /b /s’) DO (

echo. > “%%G\%~n0.txt”

)

—————————————–

Executing this simple batch file will create an empty text file named Optiplex755.txt in every sub-directory.

Repeat as necessary for each model and each model’s top-level driver folder.

If you add or change any drivers for a model, just re-execute the script.

http://myitforum.com/cs2/blogs/jsandys/archive/2010/04/05/duplicate-drivers-helper-script.aspx
https://wbracken.wordpress.com/2009/09/26/adding-duplicate-drivers-to-sccm-sp1/



Excluding specific computers from becoming ConfigMgr 2012 clients

IT Posted on Sun, December 07, 2014 22:42:27

This registry editing trick has been around forever, but still works in ConfigMgr 2012! In fact, it’s the preferred way to keep the ConfigMgr client software from installing on specific computers in your organization.

A couple NOTEs: This only blocks ConfigMgr client software when using the site-wide automatic push method. You can still use any other method to install the client, ex. manually running CCMSetup.exe. Also, this does not exclude the computer from being “discovered”, just that the client software will not be installed once it is discovered liked non-excluded computers.

To do it…

On the ConfigMgr site server, run the Registry Editor.

Navigate to the SMS_DISCOVERY_DATA_MANAGER sub-key which is located within HKEY_LOCAL_MACHINE/Software/Microsoft/SMS/Components/SMS_DISCOVERY_DATA_MANAGER

Locate the ExcludeServers key and edit the Multi-String value.

Enter the NetBIOS name of each computer you want to exclude. Each computer name must be on its own separate line.

Hit OK and close out the Registry Editor.

http://myitforum.com/myitforumwp/2012/02/01/same-as-before-excluding-specific-computers-from-becoming-configmgr-2012-clients/



XCOPY Files / Folder

IT Posted on Thu, November 20, 2014 13:11:47

File
xcopy fzdefaults.xml “%ProgramFiles(x86)%\FileZilla FTP Client\fzdefaults.xml”* /I /S /Y /C /R

xcopy *.ora “c:\oracle\product\11.2.0\client_86\network\admin\”* /I /S /Y /C /R

Folders & Subfolders
xcopy .\swl\*.* C:\SWL /I /S /Y /C /R



Next »