locked
Surpess Registry-Notifications, triggered by PowerShell-Script RRS feed

  • Question

  • Have a PS-Script which at one point starts a .reg file.

    Invoke-Expression -Command "$env:OneDrive\Registry_File.reg" 

    It works fine with admin-rights. Would like to avoid 2 notification I do have to confirm. First one Security-Alert when starting the Registry-Editor and then to confirm that .reg has been finished. Could at least avoid one notification?

    Thanks.




    Thursday, March 5, 2020 9:07 AM

All replies

  • You cannot suppress these messages.

    You can use Group Policy to make registry changes without any messages.

    The following is the correct way to use a registry file:

    REGEDIT /i:"$env:OneDrive\Registry_File.reg"


    \_(ツ)_/

    Thursday, March 5, 2020 9:27 AM
  • used

    REGEDIT /i:"$env:OneDrive\Registry_File.reg" instead of my code. I can see no difference in the output.

    However to change the Group Policy, I believe I should a new thread ?

    Thursday, March 5, 2020 9:37 AM
  • For help with GP post in the GP forum.


    \_(ツ)_/

    Thursday, March 5, 2020 9:50 AM
  • ok will do so. thank you
    Thursday, March 5, 2020 10:00 AM