Script to remove password from all Powerpoint files

I currently have the same script to remove passwords from Word and Excel files but it does not work with Powerpoint.

$ErrorActionPreference = "SilentlyContinue"

CLS

# Paths
$encrypted_path = "C:\temp\test\"
$decrypted_Path = "C:\temp\test\new\"
$original_Path = "C:\temp\test\originals\"
$password_Path = "C:\temp\test\Passwords.txt"

# Load Password Cache
$arrPasswords = Get-Content -Path $password_Path

# Load File List
$arrFiles = Get-ChildItem $encrypted_path -Recurse

# Create counter to display progress
[int] $count = ($arrfiles.count -1)

# Loop through each file
$arrFiles| % {
$file = get-item -path $_.fullname
# Display current file
write-host "Processing" $file.name -f "DarkYellow"
write-host "Items remaining: " $count `n

# Powerpoint pptx
if ($file.Extension -eq ".pptx") {

# Loop through password cache
$arrPasswords | % {
$passwd = $_

# New Excel Object
$PowerPointObj = $null
$PowerPointObj = New-Object -ComObject PowerPoint.Application
$PowerPointObj.Visible = $false

# Attempt to open file
$Presentations = $PowerPointObj.Presentations.Open($file.fullname,1,$false,5,$passwd)
$Presentations.Activate()

# if password is correct - Save new file without password to $decrypted_Path
if ($Presentations.presentations.count -ne 0) {
$Presentations.Password=$null
$savePath = $decrypted_Path+$file.Name
write-host "Decrypted: " $file.Name -f "DarkGreen"
$Presentations.SaveAs($savePath)
# Close document and Application
$PowerPointObj.Presentations.close()
$PowerPointObj.Application.Quit()

# Move original file to $original_Path
# move-item $file.fullname -Destination $original_Path -Force
}
else {
# Close document and Application
write-host "PASSWORD NOT FOUND: " $file.name -f "Magenta"
$PowerPointObj.Close()
$PowerPointObj.Application.Quit()
}
}

}

$count--
# Next File
}

Write-host "`n Processing Complete" -f "Green"