Jump to content

Peyton Young

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Peyton Young

  1. Hi Everyone!

    We are looking to deploy a script to all of our laptops/desktops that will add a Trusted Location to both Excel and Access. It does this by changing Registry values on the users profile. Unfortunately, we are running into an issue though. When I test the script using PowerShell ISE, everything works perfectly. When I try deploying the script via Pulseway RMM Tasks, it will say the script deployment was "successful" but when I remote into the end user's computer, the Registry Editor won't show any changes being made to the Trusted Locations for either program.

    After searching through the forums, I found someone who ran into a similar issue. The answer to that question was exactly what I found on the end user's where the registry values had been changed for the .DEFAULT user.

    This leads us to my question: What is a workaround to this issue? Is there a change to the script that can be made or is this simply a limitation of Pulseway?

     

    SCRIPT:

    $trustedPath = "C:\Users\Public\Pictures\Security-Photos"

    $excelPath = "HKCU:\Software\Microsoft\Office\16.0\Excel\Security\Trusted Locations"

    New-Item -Path $excelPath -Name "Location1" -Force | Out-Null

    Set-ItemProperty -Path "$excelPath\Location1" -Name "Path" -Value $trustedPath

    Set-ItemProperty -Path "$excelPath\Location1" -Name "AllowSubfolders" -Value 1

    $accessPath = "HKCU:\Software\Microsoft\Office\16.0\Access\Security\Trusted Locations"

    New-Item -Path $accessPath -Name "Location1" -Force | Out-Null

    Set-ItemProperty -Path "$accessPath\Location1" -Name "Path" -Value $trustedPath

    Set-ItemProperty -Path "$accessPath\Location1" -Name "AllowSubfolders" -Value 1

     

     

  2. On 8/15/2022 at 10:11 AM, Tim said:

    Hi Jitesh,

    Your script is writing to "Current Users" but the Pulseway agent runs as a local system account. When you test via Powershell ISE, you're running it under a specific user account. When executing via Pulseway, the agent is executing it (as Local System, not a user account), which means, if the script runs successfully, you'll likely see your keys put into the physical registry location for Current Users, which is in "Computer\HKEY_USERS\.DEFAULT\..."

    Tim,

     

    You are absolutely correct. If I wanted to deploy a similar PowerShell script as a different user (rather than the Local system), is that possible? Or is the only option to manually remote into each desktop and use PowerShell ISE?

×
×
  • Create New...