Microsoft Office has identified a potential security concern

Daniel Kaliel 1,241 Reputation points

We have a powershell script that users can run that copies the templates we use internally from an internal network location \... to a local folder.

For the past 2 months when users run the script they get a Microsoft Word Security Notice that kills the script.


The source location and the destination location are both in the Trusted Sources list in all MS office applications.

Word Management
Word Management
Word: A family of Microsoft word processing software products for creating web, email, and print documents.Management: The act or process of organizing, handling, directing or controlling something.
901 questions
0 comments No comments
{count} vote

Accepted answer
  1. Daniel Kaliel 1,241 Reputation points

    There must be a change in powershell or something. This error was being thrown by the following line in the powershell script to obtain the Word version installed and installation path of Word.

    New-Object -ComObject word.application

    I stopped using the ComObject to obtain that information and instead pulled it out of the registry with these lines instead.

    $version = (Get-ItemProperty HKLM:Software\Classes\Word.Application\CurVer).'(default)'
    $wPath = (Get-ItemProperty HKLM:SOFTWARE\Microsoft\Office\$version.0\Word\InstallRoot).Path

    0 comments No comments

0 additional answers

Sort by: Most helpful