Thursday, August 31, 2017

RequestMPLocation failed; 0x80004005

Recently we were facing OS installation errors.
The smsts.log gave these errors:

Invalid MP cert info; no signature.Check MPs boundary group has site assignment set

CCM::SMSMessaging::CLibSMSMPLocation::RequestMPLocation failed; 0x80004005

How do you check the correct MP/Boundary?
Make a request to http://yourMP/SMS_MP/.sms_aut?MPLOCATION&ir=<IP>&ip=<IP subnet>

This string can also be found in the log.
This should return a MP certs and location. If empty, there is something wrong.

Solution:
The simple solution was to Check the settings on the Boundary Group properties-Use this site bioundary for site assignment.





Error fixed!
I think only applicable to 1702 environments.

 

Tuesday, August 8, 2017

Win10 TS error-failed to stage winpe code 0x8007000f

Sometimes, while doing OS Imaging for Win10 with UEFI selected, you light get this error in the Task Sequence. The smsts.log says-failed to stage winpe.

Reason is-Winpe is unable to stage on existing partitions, and requires a GPT partition for UEFI.

Solution-Before you select the Task Sequence to run, or when whn you get the error, press F8, and open cmd. Then run diskpart commands.

select disk 0
clean
convert gpt
create partition primary size=300
format quick fs=ntfs label="Windows RE tools"
assign letter="T"
create partition efi size=100
format quick fs=fat32 label="System"
assign letter="S"
create partition msr size=128
create partition primary
format quick fs=ntfs label="Windows"
assign letter="C"

Then retry the Imaging and chose not to clean the Disk.

 

Tuesday, June 6, 2017

High CPU usage by the Sytem Process

Recently, we faced this situations where on Server2012 R2, the System process was causing high CPU. Around 40-60%.
Normally, it uses only 5%.

How do you troubleshoot?
Use Procmon.
Filter by Process Name like System. By default it is set to not include in the filter.

You will find that it is reading some files/folders in a loop. Delete those files.

Also, check you AV exclusions.

Sunday, May 28, 2017

WMI error 0x8004106C smsprovider log

Symptoms: Sometimes, you get this error in SMS Provider log, in CM2012.
This is generally due to load on the server and WMI, during temporary processing of queries.

Resolution: This error can be fixed by increasing the quota values in __ProviderHostQuotaConfiguration WMI class.

Check out: http://blogs.technet.com/b/askperf/archive/2008/09/16/memory-and-handle-quotas-in-the-wmi-provider-service.aspx

Changing values of Memory perhost and Memory allhosts is enough.

Method is described here: http://babaus.azurewebsites.net/2015/08/14/wmi-fine-tuning-for-config-mgr/

Another way is to run this script:
$WMIProviderConfig = Get-WmiObject @WMIHT            
$WMIProviderConfig.MemoryPerHost = 1024MB            
try {            
  $WMIProviderConfig.Put() | Out-Null            
  Write-Verbose -Message "Successfully changed the WMI provider settings" -Verbose            
} catch {            
  Write-Warning "Failed to modify the WMI provider because $($_.Exception.Message)"            
}
 

Thursday, February 23, 2017

SCCM2012 - Applications stuck in state "Installing"

Problem
Some Packages when started, or when there is Mandatory Deployment, start and get stuck in state - "Installing". Due to this other Deployments also have to wait.

They never complete. Even if SCCM client is repaired/reinstalled, the state remains.
Only solution is - Remove the Deployment for that computer.

Reason
It is caused because when the Deployment is running (usually TS Deployment), the machine rebooted before the SCCM agent can finish updating all the WMI classes, but after the actual advertisement is completed. Root/ccm/clientsdk:ccm_program class isn't updated

Resolution
You can delete the instance of the policy for the deployment with powershell:

foreach($i in gwmi -Namespace root/ccm/policy/machine/actualconfig -Class ccm_softwaredistribution -Filter "ADV_AdvertisementID='<advertID>'"){$i.delete()}

Another script does same thing, and sets smstsmgr dependency to ccmexec/wmi
$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
            }
     }
 

SCCM2012 - Applications stuck in "past due-will be retried"

Problem


Many times some Applications get stuck in the state - Past Due - Will be retried. This is seen in the Software Center-Installation Status.


Reason

This usually occurs for Deployment which have date in the past, and the status in CCM class is actually installed, but not updated.


Resolution

Simply changing the Deployment deadline time fixes this. There is also a script, which changes the times for all Deployments of past.


Syntax

.\IncrementCMDeploymentStartTime.ps1 –SiteCode <EnterYourSiteCode>

Code

Param(           
    [parameter(Mandatory=$true)]           
    $SiteCode
    )

Write-Host "SCCM 2012 SP1 Deadline Time Increment Script"
Write-Host "Version 1.0"
Write-Host "Parameters"
Write-Host "  SiteCode: "$SiteCode -ForegroundColor Green

function GetCMSiteConnection
{
  param ($siteCode)

  $CMModulePath = Join-Path -Path (Split-Path -Path "${Env:SMS_ADMIN_UI_PATH}" -ErrorAction Stop) -ChildPath "ConfigurationManager.psd1"
  Import-Module $CMModulePath -ErrorAction Stop
  $CMProvider = Get-PSDrive -PSProvider CMSite -Name $siteCode -ErrorAction Stop
  CD "$($CMProvider.SiteCode):\"
  return $CMProvider
}

#Main

#Connect to SCCM, must have SCCM Admin Console installed for this to work
#If this fails then connect with the console to the site you want to use, then open PowerShell from that console
$CM = GetCMSiteConnection -siteCode $SiteCode
Write-Host "Connected to:" $CM.SiteServer
Write-Host
Write-Host "---Updating Deployments---"

foreach ($Deployment in (Get-CMDeployment))
{
  if (($Deployment.EnforcementDeadline -lt (Get-Date).ToUniversalTime()) -and ($Deployment.EnforcementDeadline -ne $null))
  {
    Set-CMApplicationDeployment -Application (Get-CMApplication -Id $Deployment.CI_ID) -CollectionName $Deployment.CollectionName -DeadlineDate ($Deployment.EnforcementDeadline).AddMinutes(1) -DeadlineTime ($Deployment.EnforcementDeadline).AddMinutes(1)
    Write-Host "  "$Deployment.AssignmentID"CI Deadline Updated" -ForegroundColor Green
  }
  else
  {
    Write-Host "  "$Deployment.AssignmentID"CI Skipped, deadline time occurs in the future or not specified" -ForegroundColor Red
  }
}






Reference-https://blogs.msdn.microsoft.com/rslaten/2013/11/26/past-due-applications-not-installing-in-sccm-2012/

Windows restart / shutdown history

Problem

Many times we need to find find out the reasons for Shutdowns/Unexpected restarts of Servers/Workstations. These event are logged in Evenlog with specific EventIDs.

Solution

By checking the specific EventIds, we can find out the time/source of Shurdown/Restarts.
Open Eventvwr and go to System log.
Filter the System log for these EventIds:
6008(The previous system shutdown was unexpected)
1074(The process X has initiated the restart / shutdown of computer...)
1076(he reason supplied by user X for the last unexpected shutdown of this computer is: ....)
http://serverfault.com/questions/702828/windows-server-restart-shutdown-history