Brant Posted September 28, 2020 Posted September 28, 2020 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
Administrators Paul Posted September 29, 2020 Administrators Posted September 29, 2020 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
Brant Posted September 29, 2020 Author Posted September 29, 2020 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.
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