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?
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