DPM – Setup cannot grant account access to the DPM database

Adding another one to the list of things they probably should have thought of, here’s a quick fix for a common DPM install error: “Setup cannot grant the … account access to the DPM Database”.

This happens because you were a responsible adult and you provided the FQDN for the Domain when you specified the SQL account in the installation wizard:

The fix is easy. Ignore your training and use the NetBIOS name for the Domain during setup.

This remains a problem as of the System Center 2016 Tech Preview 5 release.

Happy DPM-ing!

 

Surprise SCCM Maintenance: IIS Logs

This one will be quick and dirty. I guarantee once you’ve had your SCCM deployment up and running for a year or so, you’re wasting space with IIS logs. Almost all of SCCM’s primary functions operate via HTTP/S through IIS sites. Like my ex-girlfriend, IIS loves to keep track of everything that ever happened ever, and bother me with it later. IIS is no different. It’ll totally mess up your day by filling up the C:\, leading to crying, and maybe more ex-girlfriends.

What’s the best way around this? Well, you could turn off IIS logging, but in some cases SCCM will turn it right the hell back on, and Microsoft support will get grumpy without them if you ever have to engage them. Just let IIS do its thing, and clean up the logs with the following VBS code:

sLogFolder = "c:\inetpub\logs\LogFiles"
iMaxAge = 30 'in days
Set objFSO = CreateObject("Scripting.FileSystemObject")
set colFolder = objFSO.GetFolder(sLogFolder)
For Each colSubfolder in colFolder.SubFolders
Set objFolder = objFSO.GetFolder(colSubfolder.Path)
Set colFiles = objFolder.Files
For Each objFile in colFiles
iFileAge = now-objFile.DateCreated
if iFileAge > (iMaxAge+1)then
objFSO.deletefile objFile, True
end if
Next
Next

Run that bad boy as a scheduled task and go grab a beer.

Code from http://www.iis.net/learn/manage/provisioning-and-managing-iis/managing-iis-log-file-storage#02