I moved to http://www.thesccm.com

NOTE: I moved to http://www.thesccm.com

SCCM PXE boot failed after unintall WSUS.

NOTE: I moved to http://www.thesccm.com

Setup my test lab in this weekend to test SCCM TP 1609, and my PXE boot failed. SMSPXE.log shows:

RequestMPKeyInformation: Send() failed.
Unsuccessful in getting MP key information. 80004005.
PXE::MP_InitializeTransport failed; 0x80004005
PXE::MP_ReportStatus failed; 0x80070490,
PXE::CPolicyProvider::InitializeMPConnection failed; 0x80070490

mplist-failed

When tried to open MP list, http://my_sccm_server/sms_mp/.sms_aut?mplist, it gave me HTTP Error 500.19

mplist failed 2.PNG

Error Code 0x800700e, unable to load DLL.

So what happend? Well, because I uninstalled WSUS (not ask my way, I had my reason. 😀 ), applicationHost.config files didn’t updated itself.

How to fix it:

Open “C:\Windows\System32\inetsrv\config\applicationHost.config”, search “suscomp.dll”, and remove the whole line.
Problem soveled.

<scheme name="xpress" doStaticCompression="false" doDynamicCompression="true" dll="C:\Program Files\Update Services\WebServices\suscomp.dll" staticCompressionLevel="10" dynamicCompressionLevel="0" />

iis

Well, you can also install WSUS back, it will fix the problem for you. 🙂

#pxe, #sccm, #troubleshooting

Is this a good way to update ADK 1607 and custom boot image in SCCM?

 

NOTE: Read this article before you start do anything 
https://blogs.technet.microsoft.com/enterprisemobility/2016/09/09/configuration-manager-and-the-windows-adk-for-windows-10-version-1607/

I don’t know if this is a good way to update ADK 1607 and custom the winpe.wim, that is how I did it. Since I have not been any MS events, classes or trainings. Honestly I have been only one day SCCM class in my career as an IT. So don’t trust everything what I said. 🙂

PS. if this it not a correct way to do, please let me know and comments are always welcome.

First: Update ADK 1607

  1. Download ADK 1607 https://developer.microsoft.com/en-us/windows/hardware/windows-assessment-deployment-kit
  2. Uninstall earlier version of ADK.
  3. Install ADK 1607.
  4. Install to default path C:\Program Files (x86)\Windows Kits\10\
  5. These are the basic components you must install.
    Deployment Tools, Windows Preinstallation Environment, User State Migration Tool
  6. After ADK 1607 is installed, restart your server

Second: Custom default winpe.wim

Why do I custom the winpe? Well I want every boot image I am going to create has the language, keyboard layout, and timezone which are suitable for me, I don’t want to mount and umount my boot image each time. (I am lazy.)

  1. Create a folder C:\WIM
  2. Create a folder C:\WIM\Mount
  3. Copy “C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\winpe.wim” to C:\Temp\WIM
  4. Change “C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\winpe.wim” name to winpe.wim.bak
  5. Run Deployment and Imaging Tools Environment as administrator
    mdt
  6. Modify, copy and paste those dism lines what are suitable for you, and run it:
    # Mount winpe.wim to c:\wim\mount folder
    dism /mount-wim /wimfile:C:\wim\winpe.wim /mountdir:c:\wim\mount /index:1
    #set your timezone, in my case I use “FLE Standard Time”
    dism /image:C:\wim\mount /Set-TimeZone:"FLE Standard Time"
    #(Optional) if you are using other language than English, you can use these to set your winpe enviroment.
    Example: in my case is "fi-FI"
    
     dism /image:C:\wim\mount /Set-SysLocale:fi-FI
     dism /image:C:\wim\mount /Set-UserLocale:fi-FI
     dism /image:C:\wim\mount /Set-InputLocale:fi-FI 
    
    mountwim
  1. Create a new file name smsts.ini in C:\wim folder
    folder
  2. Copy and paste these to the smsts.ini file and save it.
    [Logging]
    LOGLEVEL=0
    LOGMAXSIZE=5242880
    LOGMAXHISTORY=3
    DEBUGLOGGING=1
    CCMDEBUGLOGGING=1

    smsts

  1. Copy smsts.ini file to C:\WIM\Mount\windows
  2. (Optional) Add Active Directory Module if you need it. Mick Pletcher has a blog post about it. Read here
  3. (Optional) Add Dell Command PowerShell Provider Read here
  4. Unmount and save the winpe.wim
    #unmount and commit changes
    dism /unmount-wim /mountdir:c:\wim\mount /commit
    
    unmount
  5. Copy C:\WIM\winpe.wim to “C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\
    folder2

NOTE: Repeat 1-11 for x86 boot winpe image if you deploy 32bit machines.

Third: Update OSD boot image for SCCM

Use the script https://gallery.technet.microsoft.com/RegenerateBootImageWinPE10-f508f1e4

NOTE: Read the instruction how to use this script, it will update your older version of OSD boot image to the newest version, but it doesn’t update you custom made boot image, example MDT boot image.

At last: Create/Update custom boot image

If you are using custom made boot image, example MDT boot image, you will need to recreate that again. You can use this script to reimport your drivers from you older boot image. download here.

NOTE: When I test this script, I noticed that script itself is just a function, you can either use import-module to import this script, then run it. or you can use my modified script.  Download here

 

#adk, #osd, #sccm

SCCM Search Tool (beta)

Has been in my mind to make a new tool, just didn’t know what do I make. Finally on Friday I made up my mind to make a SCCM search tool. Some time ago when we were doing troubleshooting, reading sccm log files, and have no idea what those long numbers means, example: 674ab-eec5-40e1-a5f2-9. 😀

You need Admin Console installed and connection to SCCM server before you run the tool.

This is just a beta, so it doesn’t search everything. And please don’t use too short search keywords. 😀

I will continue make it better when I have time.

Download from TechNet Gallery:  Click here

Updates: 22.9.2016. Added Software Updates search

sccmsearch

 softwareupdate

#sccm

All components Type and Availability shows “Unknown”. Failed to read the required Operations Management component registry key values on local computer; error = 6 (0x6).

This morning, I noticed in our SCCM Primary server, all components Type and Availability shows “Unknown”

unknown

After awhile, “Type” and “Availability” shows correctly, about 60 minutes later, it shows “Unknown” again, and it just repeatedly changes itself. We rebooted the server, but it didn’t help.

Investigating further, I saw that the compmon.log on the site server displayed the following errors:

"Failed to read the required Operations Management component registry key values on local computer; error 6 (0x6)"

And it repeatedly try to  add all the components to monitored component list again and again about each hour.

compmon1

I found this post has same kind issues http://sccmstuff.com/troubleshooting/compmon-log-errors-6-0x6/ ,  so I start check our registry, found out what is our problem key:

HKLM\Software\Microsoft\SMS\Operations Manager\Components\SMS_NETWORK_DISCOVERY

This registry key was empty, unlike other components registry keys. I remember we tested use Network Discovery to create boundaries automatically, but later we decided not to use Network Discovery and we deselected it. It seems the component’s registry has left behind.

I made a backup of the Components registry, deleted SMS_NETWORK_DISCOVERY registry key, restarted SMS_EXECUTIVE service. The log is clear without errors. It didn’t try to add those components to monitored list again. All components shows status correctly.

#sccm, #troubleshooting

SCCM 1606 BUG? 32-bit process Powershell detection method doesn’t work

As you know, you can use powershell detection method when you create Application in SCCM.

Usually, I use this script, and it has been working for many years:

$app = Get-WmiObject Win32Reg_AddRemovePrograms  | where-object {$_.DisplayName -like “Your Application name”}
if ($app -ne $null) {
write-host Installed
}

I choosed “Run script as 32-bit process on 64-bit clients”. Because clients are 64bits Windows 10 machines, and my application is 32-bits.

detect

As usual, I tested the detection script in my machine that has the application already installed. Run the script in ISE (x86), it will get you “Installed”. If run it in ISE (x64), it gives you nothing.

Yesterday, users complains softwares are trying to install again and again, and I started to check out what is going on.

I checked “C:\Windows\CCM\Logs\AppDiscovery.log” in few machines, applications that are using this 32-bit powershell detection method gave result “not detected”, although applications are installed.

No one has changed those Applications detection method, I wonder what went wrong.

At the end, I found the “Run script as 32-bit process on 64-bit clients” powershell dection method didn’t work right after machines have updated SCCM Client 1606. 5.00.8412.1007, based on time stamp of ccmsetup.log and AppDiscovery.log.

I have tested few more Applications, results are same.

 

#application, #sccm, #troubleshooting

SCCM 1602 roll up hotfix KB3155482 bug?

NOTE: the KB has been updated with a workaround for this issue
https://support.microsoft.com/en-us/kb/3155482

Lovely weekend, upgraded from SCCM 2012 R2 SP1 CU2 to 1511, then 1602, then hotfix KB3155482. At the end, we end up exectly like this, Client Upgrade shows old client version numbers, and SCCM Client package is not updated.
https://social.technet.microsoft.com/Forums/en-US/d8f01d28-e21a-49cd-80b7-a0cba6a200ca/1511-client-after-1602-kb3155482-upgrade?forum=ConfigMgrCBGeneral

problem

Big thanks for Niall Brady ‘s windows-noob Facebook group, Anderz Wedefelt point me out technet forum has same discussion of this matter, –Marc–  has reported as bug to MS. https://connect.microsoft.com/ConfigurationManagervnext/feedback/details/2803952

So if you don’t wanna end up like me, please remember promote automatic client upgrade to production before you install this hotfix to your site system.

Here is the fix, Wrex mentioned it in technet forums: 

  1. If you have another test envirment what is upgraded sucessfully, copy all the files from CMUClient from that server to your CMUClient folder, go to step 3.
  2. If you don’t have another test envirment you can copy those files from, do this:
    Go to EasySetupPayload folder, you will find two folders inside it. Sort them with time stamp, the older one is 1602 installation media, new one is hotfix KB31554821) Open the 1602 folder:
    1.1) copy all files from “SMSSETUPCLIENT” to “your SCCM installation pathCMUClient”
    1.2) copy msrdcoob_amd64.exe, wic_x64_enu.exe and WindowsUpdateAgent30-x64.exe from “redist” to “your SCCM installation pathCMUClientx64”
    3)copy ndp452-kb2901907-x86-x64-allos-enu.exemsrdcoob_x86.exe, silverlight.exe, wic_x86_enu.exe, windowsupdateagent30-x86.exe from “redist” to “”your SCCM installation pathCMUClienti386”

    (Optional)
    If you have choose multiple language in your site, copy also language pack from “redistLanguagePackClient”
    Example. Finnish launguage, choose FIN folder, copy “redistLanguagePackClientFINsmssetupClient” to “your SCCM installation pathCMUClient”
    2) Open the hotfix folder:

    copy all files from “SMSSETUPCLIENT” to “your SCCM installation pathCMUClient”, overwrite older files.

  3. Open “SQL Manangement Studio”, choose your CM site database, right click, create “new query”, excute this:
    select * from ClientBaseline
    select * from ClientDeploymentSettingsYou will see version are “5.00.8325.1000”sql1
     then excute this:UPDATE ClientDeploymentSettings SET UpgradeVersion = ‘5.00.8355.1306’ WHERE UpgradeProgramName = ‘Configuration Manager Client Upgrade Program’
    UPDATE ClientBaseline SET Version = ‘5.00.8355.1306’ WHERE Name = ‘Staging Baseline’
    select * from ClientBaseline
    select * from ClientDeploymentSettings

    You will now see Staging Baseline version is “5.00.8355.1306”

    sql3

  4. Update “Configuration Manager Client Piloting Package” package. Open Admin console, go to Applications-Packages, Choose “Configuration Manager Client Piloting Package”, Click update distribution points.Wait until if finished. If you don’t see “Configuration Manager Client Piloting Package”, close Admin console and reopen Admin console as Administrator.
  5. Check your site hierarchy settings, Client upgrade tab. Pre-production client version should be “5.00.8355.1306”. Uncheck “Upgrade all clients in the hierachy using production client”, if it was checked..1
  6. Now you should able to choose Client Update Options again.2
  7. Choose “I am ready to make pre-production client version available to production”, then OK.
  8. Check your site hierarchy settings, Client upgrade tab. Production client version should be updated as “5.00.8355.1306”. Check the “Upgrade all clients in the hierachy using production client” check box. then click OK.fixed
  9. Check you SMSClient folder, those files should be updated themself now, and the “Configuration Manager Client Package” should be automatic updated to distribution points.

Hope this helped you!

#sccm, #troubleshooting

SCCM Recovery – Part 2 Install Primary Site

If you are still using Configuration Manager 2012, you can run the setup.exe from the installation media folder.

If you are using Current Branch, you should run the setup.exe from “your site backup folder\CD.Latest\SMSSETUP\BIN\X64”

Rest of those are just next next next, you can find other post about it , just use your favor search engine. use key word “SCCM recovery step by step”. I personally recommended Nickolaj Andersen Recover a Site Database in ConfigMgr 2012 R2

Once again, I just wanna marked down the important notes:

  1. Hope you do find your backup folder, and there are newest backups in it. 🙂
  2. Go do something else when the recovery starts running, it might take an hour, you will have heart attack by watching it.
  3. Remember “The Post-recovery actions are now presented to you, and it’s recommended that you take those actions”, just like what Nick said.
    It means:
    Install the missing updates, hotfix.
    Input back those service account password in the Admin Console. 

Restart your server after recovery is done. 😀

 

#sccm

SCCM Recovery – Part 1 Prepare

I don’t actually know how should I write this Part 1, I recommended you read first System Center 2012 Configuration Manager R2 – Disaster Recovery for Entire Hierarchy and Standalone Primary Site recovery scenarios

There are almost everything you need, yes I said almost. 🙂

I marked down only few steps what I remembered, not step by step installation

  1. Install Windows Server
  2. Install Security updates to your sever
  3. If you are doing an automatic recovery, you should use same sever name, and exactly same partitions as your old SCCM server.
  4. Put NO_SMS_ON_DRIVE.SMS file to those partitions to root folder of any drive that you want to prevent Configuration Manager  from installing files on
  5. Install Prerequisites that are related to install SCCM, example Windows roles and Feature. You can use powershell to do that.

    Add-WindowsFeature Web-Windows-Auth,Web-ISAPI-Ext,Web-Metabase,Web-WMI,BITS,RDC,NET-Framework-Features,Web-Asp-Net,Web-Asp-Net45,NET-HTTP-Activation,NET-Non-HTTP-Activ,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-Http-Redirect,Web-App-Dev,Web-Net-Ext,Web-Net-Ext45,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-HTTP-Tracing,Web-Security,Web-Filtering,Web-Performance,Web-Stat-Compression,Web-Mgmt-Console,Web-Scripting-Tools,Web-Mgmt-Compat –Restart -Source :\sources\sxs 

  6. Install SQL, cumulative updates.
    If you still have the SQL Configuration file saved in some place, you can just use it. (I will write another post about it later and link it here. )
  7. Make more tempDB files.
  8. Install ADK, if you use SCCM to deploy OS
  9. Install MDT, if you use SCCM to deploy OS
  10. Install WSUS, if you use the primary server to sync Windows Updates.

Matter of fact, you just need to install everything same as the first time when you setup your SCCM server, so I really hope you have wrotten an documention of that.

Why do I mention 4 and 5 ? I am sure you already knew these basics things, but I have met people whom forgot these basic steps when they did SCCM recovery, perhaps people were in a hurry to recovery their SCCM, time is running out, isn’t it?! Well guess what happened when you didn’t do the basic things, will SCCM works after recovery? Of course NOT!

So, take a deep breath, calm down, clear your mind, go for a run, go Sauna..relax.. Then you start do the SCCM recovery.

#sccm

SCCM Backup – Part 2 Setup SQL Database Email

Why? Why? Why?

I was in one week holidays, guessed what happened when I came back to work. I found out that our backup disk was full, so SCCM refuse to do site backup, SQL refuse to do SQL full backup. Although I should have SCCM alert if site backup failed, but I do not know why I haven’t received a single email from SCCM monitoring alert. So I decided make SQL backup notification alert.

I believe there are many ways how you setup the SQL Alert, I am not specialist of SQL, so I am just telling how I did it, may not be the best, but it worked. 🙂

  1. Setup database mail. There is already some other post related to that. Example Pinal Dave wrote an article how to make it in SQL Server 2008, it is same in SQL Server 2012 or 2014. Of course, you should put your own information on those step, like smtp server name. I only use Step 1) Create Profile and Account from the article, and sent test email to myself, confirmed it works.
    SQL SERVER – 2008 – Configure Database Mail – Send Email From SQL Database
  2. How ever, I made small chages in the “manage Profile Security” step. I put the Profile as Public, and I choose “Default Profile”–> Yes.datamail
  3. Choose “SQL Serve Agent”, right-click “Operators”–>”New Operator…”
    Name: Send Email to myself
    Choose “Enable”
    E-mail name: youremail@email.com (put the email address of the person who actually reads emails)

#backup, #sccm, #sql