Posted September 28, 20204 yr I've implemented a script that retrieves and stores the Windows Build Version number to a custom field in the system overview. It works fine on MOST systems. However, there are a small number systems that are unable to run the script. The error message displayed includes: Start-Process : This command cannot be run due to the error: The system cannot find the file specified. I used the "Insert Output Variable Code" in the script and verified that it includes the inserted text "Start-Process -FilePath "$env:PWY_HOME\CLI.exe" -ArgumentList ("setVariable .....". For some reason, a few systems do not seem to have the environment variable PWY_HOME set. It appears that these systems are using the Enable PowerShell User Impersonation option under Pulseway Manger > Settings > Runtime. What is the easiest way to make sure that all of my systems have the PWY_HOME variable set so that any future scripts will not fail because of a missing environment variable? Thanks, Brant
September 29, 20204 yr Administrators Hi Brant, Thank you for your report. What operating systems are failing those scripts? Also is the impersonated user part of an Active Directory domain or it's a local user? -Paul
September 29, 20204 yr Author Hi Paul, Windows 8 and Windows 10. The impersonated user is local. I removed the option for the impersonated local user on one Windows 10 system that is part of AD and reran the script. It will return the set variable PWY_HOME as "C:\Program Files\Pulseway" so it appears to be the difference of the impersonated user option.
Create an account or sign in to comment