21 July 2021

Failed to retrieve the package list on distribution point

In the ConfigMgr console I was looking at Monitoring | Distribution Point Configuration Status.
To my surprise I found some DPs with the warning icon.
Looking into Detail for a DP, I found the message "Failed to retrieve the package list on the distribution point…"

Opening the message, it showed:



Looking in to smsdpmon.log on the DP, I found lines like "Failed to evaluate package XXX00123, Error code 0x80070002"
(Hint! Filter on "failed to evaluate package ") 

 You will find that these packages indeed doesn't exist in ConfigMgr. 

 A faster way to get a list of these packages, is of course…. PowerShell :-)
Open ISE as Administrator and paste this script:

$computername = "DP_FQDN"
$WMIPkgList = Get-WMIObject -NameSpace Root\SCCMDP -Computername $computername -Class SMS_PackagesInContLib | Select -ExpandProperty PackageID | Sort-Object
$Reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $computername) $RegKey= $Reg.OpenSubKey("SOFTWARE\\Microsoft\\SMS\\DP")
$ContentLib = $RegKey.GetValue("ContentLibraryPath")
$PkgLibPath = ($ContentLib) + "\PkgLib"
$drive = $PkgLibPath.SubString(0,1)
$PkgLibPath = $PkgLibPath.Replace(($drive+":\"),("\\"+$computername+"\"+$drive+"$\")) $PkgLibList = (Get-ChildItem $PkgLibPath | Select -ExpandProperty Name | Sort-Object)
$PkgLibList = ($PKgLibList | ForEach-Object {$_.replace(".INI","")})
$PksinWMIButNotContentLib = Compare-Object -ReferenceObject $WMIPkgList -DifferenceObject
$PKgLibList -PassThru | Where-Object { $_.SideIndicator -eq "<=" }
$PksinContentLibButNotWMI = Compare-Object -ReferenceObject $WMIPkgList -DifferenceObject $PKgLibList -PassThru | Where-Object { $_.SideIndicator -eq "=>" }
Write-Host Delete these items from WMI:
$PksinWMIButNotContentLib
Write-Host Delete .INI files of these packages from the PkgLib folder: $PksinContentLibButNotWMIcls


This will provide you with a list of packages that exist in WMI on DP but not in ConfigMgr. 

 To delete these packages from WMI on the DP…. PowerShell to the rescue :-)
(you need an elevated prompt or ISE as administrator) 

Get-WMIObject -ComputerName "DPNAME" -Namespace "root\sccmdp" -Query ("Select * from SMS_PackagesInContLib where PackageID = 'PACKAGEID'") | Remove-WmiObject 

When all packages are deleted from the DP, run SMSDPMON.EXE on the DP.

01 April 2020

A little note on ADR

Do you really know what Automatic Deployment Rules (ADRs) in ConfigMgr do?


ADRs Do not
First -  ADRs do not (directly) deploy updates.
Clients do not know about ADRs, so - if you are troubleshooting an update installation issue on clients, troubleshooting an ADR is not relevant.
Of course you sould validate that an ADR did evaluate successfully and that the update package is successfully distributed to distribution points, but those are not client side issues.


ADRs Do
There are three (3) things an ADRs do:
- Create or update a deployment package (and download updates to the deployment package).
- Create or update an update group.
- Create or update update deployments on that update group.


Updating an ADR does not change or update an update group, its update deployments, or the reference update package.
This only happens at the time where the ADR is evaluated and then only if the criteria specified in the ADR results in a change to the update group.

ADR Troubleshooting
For ADR troubleshooting, there is one log to rule them all: ruleengine.log. 
Ruleengine.log is of course on the site server.
This log has everything in it, including details about update downloads. 


ADR Tips
- Space your ADR evaluations so they don’t run at the same time (or on top of each other). 
This will spread out the load and eliminate the possibility of database and download contention issues.

- Set the available offset time for all deployments to allow forvthe newly downloaded content to get to your distribution points.

- Don’t use the Required attribute unless you absolutely have to in order to control network bandwidth usage. The Required attribute is a lagging, reactive indicator.
If a product is in-scope to be updated by ConfigMgr, be proactive and deploy all possible applicable updates for those products.

- Use the Custom Severity attribute to filter out unwanted updates. Manually set unwanted updates to Low Custom Severity and then include only the other custom severities (None, Moderate, Important, Critical) in the update criteria.

- Decline unwanted updates directly in WSUS manually (or use a script). This has the added benefit of pruning the WSUS update catalog used by clients and ConfigMgr which in turn has many benefits including expiring the updates in ConfigMgr. 
Common updates to decline this way includes the following:
- Itanium
- Beta
- Version Next
- Windows 10 versions not in the environment or unsupported
- SharePoint

02 March 2020

SQL Server recommendations White Paper for ConfigMgr

Hello ConfigMgr Administrator !!
How are your ConfigMgr database server doing ?

Do you know if you have the optimal settings and configuration for you ConfigMgr SQL Server installation ?

The SQL Server team has compiled a white paper with recommendations applied specifically for a ConfigMgr SQL Server, seen from a SQL Server perspective.

This is not unknown for most, but the SQL Server Team has just updated the White Paper to version 2.4.
This White Paper is not intended to replace the official guidance from the ConfigMgr product group, but as additional information.

The official ConfigMgr guidance can be found here:
https://gallery.technet.microsoft.com/Configuration-Manager-ba55428e

The SQL Server Teams recommendations can be found here:
https://gallery.technet.microsoft.com/SQL-recommendations-for-ead4747f




24 February 2020

ConfigMgr Dashboards

As a ConfigMgr administrator, how often have you wished you had a fantastic dashboards, that in a quick glance could show you the health of your environment and different status in beautiful colours (of course - green is the preferred colour ).



A group of Microsoft PFEs has created a bunch of such dashboards.

You can read more about these here:
https://techcommunity.microsoft.com/t5/premier-field-engineering/premier-offerings-system-center-configuration-manager-and-intune/ba-p/1044351

and here:
https://secureinfra.blog/2019/01/10/configuration-manager-advanced-dashboards-rich-view-of-your-configuration-manager-environment/

On both sites are stated:
If you are a Microsoft Premier customer you can reach out to your TAMs for delivery questions!!

So - go ask your TAM for these.....

09 July 2019

end of support for ConfigMgr 2007

Today, July 9th, marks the end of support for ConfigMgr 2007

Unknown SQL Error! in SMSProv.log

I was at a customer who could not start ConfigMgr console on the site server after an CB update.
In SMSProv.log following messages was thrown:
*** *** Unknown SQL Error!
*~*~*** Unknown SQL Error!    ThreadID xxxx, DbError: 50000, Sev: 16~*~*
Results returned: 0 of -1

It turned out that the customer has performed a CB update. During the "Prerequisite Check" they had a warning on SQL server level.
After the update - that went well - they looked at the SQL server.
At some point someone has tried to install a service pack, which has only updated some (?) SQL components, leaving others in current state.
They tried to install the service pack again, but they could not, because the sql was already updated...
They detached the databases, uninstalled and installed the sql server, updated it and attached the databases again.

The ConfigMgr console could not start up...

I did the ConfigMgr Reset, checked the right on the SQL server and databases - all fine, but still the ConfigMgr console didn't start.

Luckily I found a post that stated that ConfigMgr requires SA to be owner of the database.
When you do an attach, the user doing this will become the owner.

I ran EXEC sp_helpdb and found the userid for the person who attached the databases as Owner.
To change the owner, I ran:
USE
GO
EXEC sp_changedbowner 'sa'

After this, I could start up the ConfigMgr console again.