publisher retirement

Head Teacher 0 Reputation points
2026-09-17T09:54:52.95+00:00

we have many publisher documents saved on a school shared SharePoint area, therefore saved across and in a large number of folders. Will the PowerShell Batch Script work in converting to PDF across the all documents in a share area as we don't have the capacity to find all our publisher documents and move them to one folder for conversion.

Microsoft 365 and Office | Publisher | For education
0 comments No comments

1 answer

Sort by: Oldest
  1. Killian N 4,320 Reputation points Independent Advisor
    2026-09-17T10:11:06.1766667+00:00

    Hi Head Teacher,

    The PowerShell script supports the -Recurse parameter, so it can search a selected folder and all its subfolders for Publisher .pub files. You do not need to move all the files into a single folder.

    For files stored in SharePoint, please note that the script works with file-system paths rather than a SharePoint web URL. You would normally need to:

    1. Sync the relevant SharePoint document library to a Windows computer using OneDrive.
    2. Make sure the Publisher files are available locally and not only stored online.
    3. Run the script against the synced library’s root folder with [-Recurse].
    4. Confirm that the account running the script has permission to open the files and save the resulting PDFs.
    .\Convert-PubFileToPDF.ps1 -Filter "C:\Path\To\SyncedLibrary\*.pub" -Recurse
    ``
    

    Microsoft Publisher must remain installed and licensed on the computer performing the conversion. The script is designed to continue if an individual file fails and report which files were converted or encountered an error. If a PDF with the same name already exists, that file will not be overwritten.

    Because your library contains many folders and documents, I recommend testing the process on a small synced folder first. This will help you verify the PDF output, permissions, file paths, available disk space, and SharePoint synchronization behavior before processing the entire shared area.

    For more information, please refer to the following link:

    I hope the information I shared earlier was somewhat helpful in addressing your issue. If you have any further questions or updates, please don’t hesitate to share.   

    Kind regards,

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.