Jitesh Modashia Posted August 11, 2022 Share Posted August 11, 2022 HI All, I am trying to enable SSO on my endpoint running Windows 10 x64 by running the below PowerShell Script through Pulseway RMM, however the Task runs successfully, but does not execute on the computer and doesn't give me any errors. I have however ran the script on Windows PowerShell ISE locally on the computer and it executes without any problems. Please can someone help me understand why this script will not execute on the endpoint via Pulseway RMM. i have however ran other scripts on my test machine and they work, but for some reason this one doesn't seem to want to execute. PowerShell Script: # Set variables to indicate value and key to set $RegistryPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoftazuread-sso.com\autologon' $Name = 'https' $Value = '1' $Path = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoftazuread-sso.com\autologon' # Create the keys if it does not exist If (-NOT (Test-Path $RegistryPath)) { New-Item -Path "$Path" -Force | Out-Null } # Now set the value New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force Jamie Taylor 1 Link to comment Share on other sites More sharing options...
Staff Tim Posted August 15, 2022 Staff Share Posted August 15, 2022 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\..." Jamie Taylor 1 Link to comment Share on other sites More sharing options...
Peyton Young Posted June 22 Share Posted June 22 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? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now