Uninstalling patch via powershell script (MSIEXEC)

im kinda new to powershell and im trying to automate a uninstall patch so I can install another one (using jenkins etc~).

I have this script which gets the ProductID number and i have the path to the patch .msp file too. Passing these variables to the msiexec command doesn't work. I keep getting the error: "This installation package could not be opened. Verify that the package exists~'.

Although, if i run the command without passing the variables to the msiexec it works.

Heres my script:

    $PATHPreviousPatch = "<>" #this is where I keep the .msp files to the patch that im trying to uninstall

    $IdNumber = Get-WmiObject -Class Win32_Product | Where-Object -FilterScript {$_.Name -eq "%product Example%"} | Format-List -Property IdentifyingNumber
    $strProductCode = $IdNumber | Out-String

    $strProductCode -match "IdentifyingNumber : (?<content>.*)"
    $strProductCode = $Matches['content']

    [string]$AppMSP = Get-ChildItem $PATHPreviousPatch| Where-Object {$_.Name -match "%appmsp%.msp"}
    $fullUninstallPath = $PATHPreviousPatch + $AppMSP #just to get the full path to the MSP file

    msiexec /package `'$strProductCode`' /uninstall """$fullUninstallPath"""

Pls help, I've tried everything i could find..

Thanks in advance.