E_SMPERROR_MIGRATIONID_NOT_FOUND (204)

When I was using state migration point for user data backup and recover during OSD, it failed multiply times today. and the error message was

“SMP request to failed with error: E_SMPERROR_MIGRATIONID_NOT_FOUND (204)”

Not sure what went wrong, just tried again and failed again.

Then I realized that I was backing up user data in one location, when I recover user data, the computer was in another location.

When I checked the Migration Status in SCCM, indeed that backup was in the wrong location.

Then I added new location to the existing Migration Point server from Site System Roles, and it fixed the issue right away!

 


SCCM PXE Boot TFTP Issue

My SCCM PXE Boot environment was working fine a few months ago, and but it broke and showing this when I boot up any machines:

Client Mac Addr: xxx GUID: xxx
Client IP: xxx MASK: xxx DHCP IP: xxx
Gateway IP: xxx
TFTP…
PXE-M0F: Exiting Intel Boot Agent.

So the client can get an IP. that’s a good sign.

Then I checked SMSPXE.log on the DP server..There are some error messages, and I followed those, and it got me into wrong direction. ( Removing and Re-installing PXE component didn’t help at all)

Later I enabled detailed logging with WDS Service:

And found out this error message:

So it looks like the client having issues downloading the boot image via TFTP…

then I checked if the WDS server is listening on TFTP 67/68 port…

NETSTAT -an|more

I couldn’t found 67/68 port… So what is wrong with WDS ?

Finally….out of curiosity, I clicked this setting from “Windows Deployment Services”, and wola! it worked!

 


My Shavlik Filter (Ivanti)

This is my Shavlik Filter for auto publishing

 

 

 

 


SCCM DP Installation Notes

distmgr.log

CWmi::Connect() failed to connect to \\DP-name.dm.xxx.yyy.corp\root\CIMv2. Error = 0x800706BA
0x800706BA = the RPC server is unavailable.

Failed to install DP files on the remote DP. Error code = 1722

– primary site computer account is in local admin group
– windows firewall disabled on both computers (firewall set service remoteadmin enable, file sharing)
– remote diff compression installed
– IIS installed (ISAPI, Windows Authentication, IIS6 Metabase comp, IIS6 WMI Compatibility)
-mofcomp.exe smsdpprov.mof

Copy the smsdpprov.mof file into Distribution Point installation drive, you can find the smsdpprov.mof file under <drive:>\Program Files\Microsoft Configuration Manager\bin\X64 in your primary site server


SCCM Package for Registry Permissions Change

Orignally I have Powershell script for doing that, but it turns out not so good:

if (!(Test-Path HKCC:))
{New-PSDrive -PSProvider registry -Root HKEY_CURRENT_CONFIG -Name HKCC}
$RegPath= ”HKCC:\SOFTWARE\XXX”
New-Item -Path ”HKCC:\SOFTWARE\” -Name Encompass -Force
$acl = Get-Acl $RegPath
$rule = New-Object System.Security.AccessControl.RegistryAccessRule (“BUILTIN\Users”,”FullControl”,”Allow”)
$rule2 = New-Object System.Security.AccessControl.RegistryAccessRule (“Everyone”,”FullControl”,”Allow”)
$acl.SetAccessRule($rule)
$acl.SetAccessRule($rule2)

Here is the bath file to do the registry permissions change:

reg add “HKCC\SOFTWARE\XXX” /f
REGPERM /K “HKEY_CURRENT_CONFIG\SOFTWARE\XXX” /A:Everyone:F /E /I /F

Here is the little program can make great registry permission change:

regperm

 

 


Fix WPAD Vulnerability by Changing Host File with SCCM

It was a bit more diffcult than I thought, originally I was using compliance settings, but then it didn’t work so well. So I go back to the classic application deployment by SCCM.

Here is the detection method:

# WPAD Vulnerability Remediation Discover Script
# Rui Qiu
# v 2.0
# 4/5/2018
# Last edit: 4/11/2018

$i = 0
$results = Select-String -Path $env:SystemRoot\System32\Drivers\etc\hosts -Pattern wpad
foreach($result in $results)
{$i+=1}

# Write-Host $results
if ($i -eq 2 )
{Write-Host “Installed”}

 

Because some workstations are still on Powershell 2.0, so I have to use a Hosts Commander to remove and add wpad entries.

Install-Module PsHosts
Remove-HostEntry wpad*

Add-HostEntry -Address 255.255.255.255 -Name wpad
Add-HostEntry -Address 255.255.255.255 -Name wpad.corp.lan

https://code.google.com/archive/p/hostscmd/

Here is the batch file command:

hosts.exe rem wpad*
hosts.exe add wpad 255.255.255.255
hosts.exe add wpad.corp.lan 255.255.255.255


Rapid7 Insight Agent Update Fix Discover Script

# Rapid7 Insight Agent Update Fix Discover Script
# Rui Qiu
# v1.1
# 4/3/2018

$folder = “C:\Program Files\Rapid7\Endpoint Agent”

if (test-path $folder)
{
$content = (get-content config.json | where { $_ -match “smart_ttl_start” } )
# echo $content
$key = ‘ “smart_ttl_start”: 128,’
# echo $key
if ($content -eq $key)
{$Compliance = “Yes”}
Else
{$Compliance = “No”}

}
else
{$Compliance = “Yes”}

$Compliance


Issues Installing Shavlik (Ivanti Patch)

I didn’t realize a simple issue can cause a big issue with Shavlik:

When launching the installer from Shavlik, you have to “Unblock” the file before running the isntaller, otherwise you will get failed to create folder when you are running the Ivanti Patch checker.

And when you launch the SCCM console, you have to right click “Run as Administrator”. otherwise it won’t work as well.

 

 


How to Set up SCCM SSRS Email Notification

First go to your SQL Reporting server, and launch “Reporting Services Configuration Manager”:

It is best to use an internal SMTP server. And once you have set it up, you can use this Powershell script to test if your email function is working:

Write-Host “Sending Email”
$smtpServer = “xxx.CORP.LAN”
$msg = new-object Net.Mail.MailMessage
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = “[email protected]
$msg.To.Add(“[email protected]”)
$msg.subject = “SMTP Server Test”
$msg.body = “SMTP Server Configuration is correct”
$smtp.Send($msg)
Write-Host “Email Sent”

Once you can get the test email, now go back to SCCM Server, you can start creating a subscription:

If you need to get the external SMTP working, probably you need a virtual SMTP server:

http://gaurangpatel.net/setting-up-smtp-server-in-windows-to-use-gmail


SCCM WSUS Update Failed with 0x80244022

When I checked the error code, it said HTTP error 503 from WUAHandler.log, it turned out that the Wsuspool was stopped in IIS, and I have to changed the “Private Memory Limit” to 4194304.

 

https://tuxpiekiesccm.blogspot.com/2015/09/windows-updates-failed-0x80244022.html