Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

SOLVED Unified Write Filter detection

  • Thread starter Thread starter pcb
  • Start date Start date
  • Replies Replies 6
  • Views Views 7K
Status
Not open for further replies.

pcb

Well-Known Member
Messages
45
Solutions
2
Reaction score
0
Points
6
We are trying to create deployments with multiple deployment types to handle different scenarios like Deep Freeze and Microsoft's Unified Write Filter. Deep Freeze was easy, but creating a deployment type with requirements for UWF fails when UWF is NOT installed on the target.

If we create a custom global condition like this:
1652468524782.png
and then add the requirement that UWF is currently inactive:
1652467660487.png
It works. However, when UWF is NOT installed DCMWmiProvider.log shows:
1652467323092.png
and the application fails install even though there is another deployment type that should run when UWF is not present. The deployment type that has highest priority looks for a registry key that is only present when UWF is installed and should run if it doesn't exist. I confirmed that by deleting the second deployment type that queries WMI for the UWF_Filter class. The application immediately installed.

If UWF is installed, the above UWF_Filter query works and the application installs without error when UWF CurrentEnabled is false. It is only when UWF is not installed that the whole thing fails. I have tried adding the reqistry key exists requirement to the UWF Active deployment type without success and I tried adding a requirement that the CurrentEnabled property exists, but both attempts failed. We get the same invalid class error in the DCMWmiProvider.log.

Anyone have an idea how we can get this working when UWF is not installed?
 

Attachments

  • 1652467575403.png
    1652467575403.png
    28.7 KB · Views: 11
Seems like this might be a bug? I'm not sure why one deployment type failing would cause all of them to fail - even the ones that have higher priority... There are three in the above situation (two with higher priority) and the one with highest priority installs successfully if Deep Freeze and UWF are not installed as long as this last deployment type is not included.
 
Attempting to work around this with powershell:
We created the following script (truncated here):
#Query uwfmgr.exe for filter status and return to MECM
# Global variables
$NAMESPACE = "root\standardcimv2\embedded"

########################################################################################################################

# Get current state of UWF
if ($objUWFFilter) {$objUWFFilter = Get-WmiObject -Namespace $NAMESPACE -Class UWF_Filter;}
if(!$objUWFFilter) {
echo disabled
return;
}

# Check if UWF is enabled
if(($objUWFFilter.CurrentEnabled)-or($objUWFFilter.NextEnabled)) {
echo enabled
} else {
echo disabled
}

# SIG # Begin signature block

Then tested the script on the target computer - it runs successfully and echos "disabled"

Then created a new global condition:
1652913930872.png


Then added the requirement that the script returns "disabled"
1652914044889.png

And it does not work. AppDiscovery.log shows:
1652914961619.png

And I don't know where to go from here...
 
Does anyone know the trick to getting a script to return a value to CM? I've tried the echo command (as indicated in the dialogs within CM), but I am not sure how to troubleshoot and see if the returned value is actually received by CM. I have tried returning a string (disabled or enabled) and an integer (0 or 1), but neither seems to work. --I'm not even sure the script runs on the target. I have tried self-signing the script and importing that certificate to the target machine and also tried eliminating the signature and setting the execution policy to "unrestricted", but I seem to be flailing...
 
Status
Not open for further replies.

Forum statistics

Threads
7,159
Messages
27,948
Members
18,242
Latest member
amcnear

Latest posts

Trending content

Back
Top