You have a folder full of old PowerPoint .ppt files that you need to convert to the modern .pptx format. Opening each file manually and using Save As is slow and error-prone when you have dozens or hundreds of presentations. The root cause is that older .ppt files use a binary format that lacks features like XML-based structure, improved compression, and compatibility with newer PowerPoint tools. This article explains how to use PowerShell with the Office Interop assembly to bulk convert every .ppt file in a folder to .pptx in one automated pass.
Key Takeaways: Bulk .ppt to .pptx Conversion via PowerShell
- PowerShell script with Microsoft.Office.Interop.PowerPoint namespace: Launches PowerPoint in the background, opens each .ppt file, and saves it as .pptx without user interaction.
- File extension filter -Filter “ppt”: Targets only old-format files and skips files already in .pptx format.
- PowerPoint.Application COM object with Visible = $false: Runs the conversion process silently without displaying the PowerPoint window.
Why PowerShell With Office Interop Is the Right Tool for Bulk Conversion
PowerPoint does not include a built-in batch conversion tool. The File > Open and File > Save As workflow handles one file at a time. For bulk operations, you need a programmatic approach that can iterate over a folder, open each presentation, and save it in the target format.
PowerShell with the Office Interop library is the standard solution because it directly controls the PowerPoint application object. The Interop assembly exposes the full PowerPoint object model, including the Presentation.SaveAs method, which accepts the PpSaveAsFileType enum value ppSaveAsOpenXMLPresentation (value 24) for .pptx output.
Before you begin, confirm the following prerequisites:
- PowerPoint (Microsoft 365 or 2021, 2019, 2016) is installed on the same machine where the script runs.
- PowerShell 5.1 or later is available. Windows 10 and Windows 11 include PowerShell 5.1 by default.
- The .ppt files are not password-protected. Interop cannot open password-protected files without manual intervention.
- The user account running the script has write permissions to the destination folder.
The script launches PowerPoint as a COM object. Each .ppt file is opened, converted, and closed one at a time. After all files are processed, the script quits PowerPoint cleanly to release system resources.
PowerShell Script to Convert All .ppt Files to .pptx
The script below performs the bulk conversion. Copy the entire script into a .ps1 file, for example Convert-PptToPptx.ps1. Adjust the $sourceFolder path to match your environment.
- Open PowerShell as Administrator
Press the Windows key, type PowerShell, right-click Windows PowerShell, and select Run as administrator. Administrator rights are not strictly required for the script, but they prevent permission errors if the source folder is in a protected location such as C:\Program Files. - Set the execution policy to allow local scripts
Run this command: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser. This setting allows locally created scripts to run while still blocking unsigned remote scripts. - Create the PowerShell script file
Open Notepad or any text editor. Paste the following code:
# Convert-PptToPptx.ps1
# Bulk convert all .ppt files in a folder to .pptx using Office Interop
$sourceFolder = "C:\Presentations\OldFormat"
$pptFiles = Get-ChildItem -Path $sourceFolder -Filter "ppt"
if ($pptFiles.Count -eq 0) {
Write-Host "No .ppt files found in $sourceFolder" -ForegroundColor Yellow
exit
}
$powerPoint = New-Object -ComObject PowerPoint.Application
$powerPoint.Visible = $false # Run in background
foreach ($file in $pptFiles) {
$fullPath = $file.FullName
$outputPath = [System.IO.Path]::ChangeExtension($fullPath, ".pptx")
Write-Host "Converting: $fullPath" -ForegroundColor Green
$presentation = $null
try {
$presentation = $powerPoint.Presentations.Open($fullPath, $true, $false, $false)
$presentation.SaveAs($outputPath, 24) # 24 = ppSaveAsOpenXMLPresentation
$presentation.Close()
Write-Host "Saved: $outputPath" -ForegroundColor Cyan
}
catch {
Write-Host "Error converting $fullPath : $_" -ForegroundColor Red
}
finally {
if ($presentation -ne $null) {
[System.Runtime.InteropServices.Marshal]::ReleaseComObject($presentation) | Out-Null
}
}
}
$powerPoint.Quit()
[System.Runtime.InteropServices.Marshal]::ReleaseComObject($powerPoint) | Out-Null
Write-Host "Conversion complete. Processed $($pptFiles.Count) files." -ForegroundColor Green
- Save the script file
Save the file as Convert-PptToPptx.ps1 in a folder you can easily access from PowerShell, for example C:\Scripts. - Run the script
In the PowerShell window, type: C:\Scripts\Convert-PptToPptx.ps1 and press Enter. The script lists each file as it converts. The original .ppt files remain unchanged; new .pptx files appear in the same folder. - Verify the output
Open a few of the new .pptx files in PowerPoint and confirm that all slides, text, images, and transitions are intact. The conversion preserves most content, but some very old animations or embedded objects may shift slightly.
Script Parameter Customization for Different Folder Structures
The script above processes only the top-level folder. If your .ppt files are scattered across subfolders, modify the Get-ChildItem line to include the -Recurse parameter. Replace the original line with:
$pptFiles = Get-ChildItem -Path $sourceFolder -Filter "ppt" -Recurse
With -Recurse, the script finds .ppt files in every subfolder and saves the converted .pptx file in the same subfolder where the original .ppt resides. The folder hierarchy is preserved.
If you want to send all converted files to a single output folder instead of keeping them alongside the originals, add a destination path variable and use the Join-Path cmdlet. For example:
$destinationFolder = "C:\Presentations\Converted"
if (-not (Test-Path $destinationFolder)) {
New-Item -ItemType Directory -Path $destinationFolder | Out-Null
}
$outputPath = Join-Path -Path $destinationFolder -ChildPath ($file.BaseName + ".pptx")
Common Issues During Bulk Conversion and How to Resolve Them
PowerPoint COM object fails to instantiate
If the script throws an error on New-Object -ComObject PowerPoint.Application, PowerPoint is either not installed or the COM registration is corrupted. Reinstall PowerPoint from your Microsoft 365 or Office installer. On Windows 11, go to Settings > Apps > Installed apps, find Microsoft 365, and select Modify > Quick Repair.
Script runs but no .pptx files appear
Check the $sourceFolder path. The script prints a yellow warning if it finds zero .ppt files. Also verify that the files have a .ppt extension and not .pptm or .pps. The -Filter “ppt” does not match .pptm or .pps files.
PowerPoint process stays in Task Manager after script ends
The script calls Quit and releases the COM object, but a lingering PowerPoint process can occur if an exception prevents the finally block from executing. To clean up, open Task Manager, find POWERPNT.EXE, and end the task. To prevent this, wrap the entire loop in a try-catch-finally structure as shown in the script above.
Conversion is very slow on large folders
Each .ppt file takes several seconds to open and save. For folders with more than 100 files, the script may run for several minutes. This is expected because Interop opens the PowerPoint application in the background for each file. There is no faster method using only PowerShell and Interop because the conversion requires the full PowerPoint rendering engine.
PowerShell Interop vs Third-Party Batch Converters
| Item | PowerShell + Office Interop | Third-Party Batch Converter |
|---|---|---|
| Cost | Free if you already own PowerPoint | Often requires a paid license |
| Fidelity | Uses the same rendering engine as PowerPoint | May lose animations, embedded fonts, or SmartArt |
| Automation | Scriptable, can be scheduled via Task Scheduler | Usually GUI-only or limited command-line options |
| Dependency | PowerPoint must be installed on the same machine | Standalone, no Office required |
| Speed | Slower because each file opens in PowerPoint | Faster for simple text-and-image slides |
For most business users, the PowerShell Interop approach offers the best balance of fidelity and cost. Only consider a third-party converter if you need to run conversions on a server without PowerPoint installed or if you require significantly faster throughput on hundreds of files daily.
You can now convert an entire folder of .ppt files to .pptx with a single PowerShell command. After conversion, open the new files in PowerPoint to verify content fidelity. For ongoing automation, schedule the script using Windows Task Scheduler to run nightly. An advanced tip: add a -PassThru parameter to the script that returns the list of converted file paths, which you can pipe into a logging function or a SharePoint upload script.