Wednesday, July 11, 2018

"New software is available"...

Are you seeing this in the system tray every time you log in to your computer? It's pretty annoying. There's even a Microsoft User Voice entry for it.

There is a workaround - set all your application deployment User Experience settings to "Display in Software Center, and only show notifications for computer restarts".

If you have a lot of applications already deployed, going through them one by one would be quite a chore. But, you can easily change all their settings via PowerShell.

In the code below, it changes the settings for every application we have deployed to the "User Optional - Software Center" collection.

#Import ConfigMgr PS module
Import-Module "$env:SMS_ADMIN_UI_PATH\..\configurationmanager.psd1"

#Connect to ConfigMgr drive
$SiteCode = Get-PSDrive -PSProvider CMSITE
Push-Location "$($SiteCode.Name):\"

#Change User Experience
Get-CMApplicationDeployment | Where-Object { 
    $_.CollectionName -eq 'User Optional - Software Center' 
} | Set-CMApplicationDeployment -UserNotification DisplaySoftwareCenterOnly

H/T Reddit

Thursday, May 24, 2018

Failed to install distribution point. Error 0x800706BA.

I was trying to install an additional distribution point and was getting the errors below in distmgr.log:


CWmi::Connect() failed to connect to \\server.domain.com\root\CIMv2. Error = 0x800706BA
DPConnection::ConnectWMI() - Failed to connect to  server.domain.com.
Failed to install DP files on the remote DP. Error code = 1722

Lots of Googling suggested the following suggestions:

I had done all this. Still seeing the same error. Then we checked NSLOOKUP. There was no record in DNS for our server name.

As it turns out, the IP address for our server was previously assigned to another server in DNS. Our network department swapped it to our new server, and I was able to install the DP role.

I hope this helps someone, as I could not find this info anywhere!

Tuesday, April 3, 2018

Uninstall Office 365 via script

I had trouble finding this, so I'm documenting here. Need to uninstall Office 365? Here you go.

Create an uninstall.xml file:
<Configuration>
<Display Level="None" AcceptEULA="True" />
<Property Name="FORCEAPPSHUTDOWN" Value="True" />
<Remove>
    <Product ID="O365ProPlusRetail">
      <Language ID="en-us" />
    </Product>
</Remove>
</Configuration>

Create a batch file with the following:
set loc=%~dp0
"%loc%setup.exe" /configure "%loc%uninstall.xml"

Friday, March 9, 2018

A cleaner looking restart application

We recently started testing Anders Rodland's client health script. I really like the script, it does a great job of reporting client health issues and remediates some common client health problems.

One of the sections of his script checks to see if the client is in a pending reboot state and uses a shutdown utility by Coretech that displays a message to the end user:


This utility works perfectly fine, but my users were quite put off by its appearance. Some thought it might be malware. Unfortunately, there is no way to modify the appearance of the popup message, other than the text ("we are about to install a new version...").

If we were going to use this script and take advantage of the restart option, we needed a friendlier looking restart prompt.

Enter the PowerShell App Deployment Toolkit. This utility is excellent for a wide array of things. We typically have used it for deploying applications where we want to provide some user notification or interaction.

By using a couple of the built-in features of this utility, I was able to create a very simple restart app that uses our logo, colors, and text. We added a countdown timer to the restart window to allow the user some time to save work and close apps.

You can read their instructions for customizing the appearance and how to deploy it, but here are the commands I used for this purpose. No steps are needed in any of the sections in Deploy-Application.ps1 except for the post-installation section.
##*===============================================
##* POST-INSTALLATION
##*===============================================
[string]$installPhase = 'Post-Installation'
  
## Perform Post-Installation tasks here
        
Show-InstallationPrompt -Message 'Your computer must be restarted to complete installation of important security updates. You will be given 10 minutes to save your work and close any open applications.' -Icon Information -ButtonMiddleText 'OK'
        
Write-Log -Message "Restarting computer"
        
Show-InstallationRestartPrompt -Countdownseconds 3600 -CountdownNoHideSeconds 60


You can modify the number of seconds to suit your needs. The first number is the initial countdown, the second number is the countdown if the user clicks "Restart Later". When it runs, it looks like this:





Tuesday, January 16, 2018

Error: 80004005 during imaging


I saw this error in smsts.log when installing applications during OSD. AppEnforce.log had no errors.

I then found this error in CITaskMgr.log:


A little more sleuthing in the CAS.log showed the problem:


The cache was not big enough to download all of the required content. You can change your ConfigMgr client install parameters to increase the cache size (SMSCACHESIZE=XXXXX) to resolve this. In my case, I didn't want all clients to have the larger cache size, so I only applied this to one group of systems. In the section where I'm installing these apps, I add a PowerShell script to increase the cache size:

$Cache = Get-WmiObject -Namespace 'ROOT\CCM\SoftMgmtAgent' -Class CacheConfig
$Cache.Size = '20480'
$Cache.Put()
Restart-Service -Name CcmExec

Friday, December 1, 2017

Adobe Acrobat Pro DC installation failure - exit code 1603

I was getting this error when imaging a new machine. Other apps were installing fine. The error itself didn't offer much information.

I modified the command line to include verbose logging:

MSIEXEC /i "%loc%AcroPro.msi" /q /norestart TRANSFORMS="%loc%AcroPro.mst" /L*V "%loc%Acrobat.log"

I ran the install again and looked at the log file. There I found an error regarding Visual C++ Redistributable 2013. The install failed because this was not present.

Adobe kind of buries the workaround in their documentation, but addding "IGNOREVCRT64=1" to the command line ignores the Visual C++ Redistributable 2013 requirement and installs cleanly.

MSIEXEC /i "%loc%AcroPro.msi" /q /norestart IGNOREVCRT64=1 TRANSFORMS="%loc%AcroPro.mst" /L*V "%loc%Acrobat.log"

Monday, November 20, 2017

Class not registered (Error: 80040154; Source: Windows)

After setting up a new ConfigMgr site, I was testing OSD using a migrated task sequence. We use an HTA front end that collects some basic information about the user: department, building, room, role, etc. This HTA is part of a small package we built in ConfigMgr. However, when we selected the task sequence and the package tried to load, the task sequence failed:


A Google search did not shed any light on the issue. That's why I'm posting this blog, maybe it will help some poor soul.

The reason for this error is HTA support is not enabled by default in WinPE. Without it, HTA files fail to run. You can enable this by doing the following:

From the ConfigMgr console, navigate to Overview - Operating Systems - Boot Images. Right click your boot image (we use the x64 image), and select Properties. Click the Optional Components tab and check HTML (WinPE-HTA). We also added a few more options, such as PowerShell.


Once you do this, you will need to follow the steps to update your boot image.