IIS Log File Cleaning

The other day I noticed that my SCCM Site Server’s C drive was almost full.  After some searching, I found that the directory C:\Inetpub\Logs\Logfiles was consuming all of the drive space.

Now, I don’t recall ever being told to clean IIS Log Files, but all of my peers seem to know about it!!  Thus, that makes me…uh…..well….late to the game at the very least!!

Here is a great document on IIS Log File Cleaning.  Don’t be like Matthew.  Clean your log files!


SCCM Fast Ring–Good or Bad (hint….bad!)

Last week I noticed that a colleague of mine had upgraded their SCCM environment to 1706.  This person manages well over 100,000 endpoints, so I figured 1706 was good to go.  Nope!

First, a bit of information regarding fast ring and regular ring.  Fast Ring for ConfigMgr is technically beta.  This means that even though you can put it in your production environment, you might want to wait.  Just like Windows 10 servicing, the Fast Ring will go production four months after the release.  In between……well, therein lies the problem.  You will most definitely get hotfixes every now and then while on Fast Ring, but you may also run into this:


“This update is available in the Updates and Servicing node of the Configuration Manager console for environments that were installed by using first wave (Fast Ring) builds of version 1706 downloaded between August 8 and August 11, 2017.”  According to the product team, only about 50 SCCM infrastructures were affected.  Guess who was part of the 50!

I installed SCCM 1706 on Friday August 11th.  Thus, I fell into one of the 50 that needed the hotfix.  Until today we were not able to install applications from the Software Center or OSD.  That, as you can imaging, was bad!

Lesson learned:  Perhaps don’t install SCCM Fast Ring unless you really really really need it and even then, be prepared for some issues from time to time until the release is full production.

Reading Task Sequence Variables in WinPE

Now and then you may have a need to read a task sequence variable during the OSD process. Today was one of those days. I had just modified a step in my task sequence and used the variable %OSDisk%. Well, the task failed. So……I put a pause in the task sequence and used PowerShell to find the variable. Turns out, there isn’t an OSDisk variable once the OS is dropped.

To see the variables and their values:

· Your WinPE boot image needs to have PowerShell on it

· In WinPE hit F8 to open a command prompt

· Type PowerShell to….well, you know, open PowerShell!!

$tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment

Foreach ($i in $TSEnv.GetVariables()) {“$i” + ‘ = ‘ + $TSEnv.Value(“$i”) | Out-File FilePath X:\Windows\Temp\SMSTSlog\TSVar.log –append}

At this point you can use CMTrace to open and view the file.

If you just want to see the value of one TS Variable: $TSEnv.Value(“OSDTargetSystemDrive”) for example.

Notes: The log file created has a ton of duplicate variables and values. Not sure why, and really don’t care either!! All I wanted to do was find the value for where the Operating System is. I have no idea if I will ever need to query TS Variables again, but good to know that I can!