Join the Conversation

To sign in, use your existing MySonicWall account. To create a free MySonicWall account click "Register".

Options

Uninstalling the CFC off multiple machines

Hi All, I've been going round the houses with Sonicwall support on this, since the product is going EOL (and our licence for it is expiring). The issues:

There is no bulk uninstall utility

Each client has a unique MSI install ID and unique password

Sonicwall will not or cannot change the passwords.

Sonicwall can and will provide, if pushed, however a CSV export of all your hostnames and their associated passwords - and with this I've put to gether some (no doubt crappy, and I'm sure someone else could do a lot better) Powershell to do the uninstall. I'm deploying with PDQ, you may have other options:

<#

.SYNOPSIS

  CFC Removal Script

.DESCRIPTION

  A script to automate removal of the Sonicwall CFC. Script extracts the install information to a text file,

  extracts the uninstall command from that file and parses that with the password for each host from a CSV file provided by

  Sonicwall

.PARAMETER <paramName>

  <Description of script parameter>

.EXAMPLE

  <An example of using the script>

#>

# Extract install information to text file


&"C:\Program Files (x86)\Sonicwall\Sonicwall Content Filtering Client\CFCService.exe" -show install > C:\CFC.txt


#Declare variable for install data file


$cfc_file = "C:\CFC.txt"


#Declare variable for installed computer as myFQDN


$myFQDN=(Get-WmiObject win32_computersystem).DNSHostName+"."+(Get-WmiObject win32_computersystem).Domain


#Import CSV with hostnames and passwords and declare variable where hostname matches FQDN of host


$hostpass = Import-Csv \\<server>\<share>\<path>l\<name of csv provided by Sonicwall>.csv | Where-Object {$_."HOSTNAME" -eq $myFQDN}


#Declare variable for uninstall package id


$uninstall_info = (Get-Content $cfc_file)[5].Substring(33,48)


#Declare variable for password from imported CSV


$uninstall_password = $hostpass."UNINSTALL_HASH"


#Create concatenated command line containing MSI uninstall with package and /qn flags


$final_command = "$uninstall_info"+ "$uninstall_password"+ " /qn"


#Run final command


Start-Process -FilePath "$env:systemroot\system32\msiexec.exe" -ArgumentList /X"$final_command"

Like I say, I am sure someone else could do a better version, but I didn't see one handy, so I hope this helps anyone in the same position. Provided as-is.

Nick

Category: Content Filtering Client
Reply
Sign In or Register to comment.