Microsoft Office has identified a potential security concern

Daniel Kaliel 1,266 Reputation points
2021-06-24T17:03:38.907+00:00

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.

109076-word-notice.jpg

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.
939 questions
0 comments No comments
{count} vote

Accepted answer
  1. Daniel Kaliel 1,266 Reputation points
    2021-06-24T19:27:28.29+00:00

    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

Your answer

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