Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


keithdavis
2021-03-25T12:23:52Z
Currently, on several machines, we use Task Scheduler to export the environment variables of those machines to a text file for backup (we've had issues with these being deleted and also if we have to rebuild a machine from scratch). Right now, we do that using a batch file that contains:

set>C:\Users\%USERNAME%\Documents\Personal\ExportBackups\%COMPUTERNAME%-ENV.txt

Actually, we don't need the user environment variables (or we could use SYSTEM), but I can't seem to find a way to do the "set" command from VisualCron. Any ideas?
Sponsor
Forum information
bweston
2021-03-26T15:00:11Z
Get-ChildItem env:
?

Edit: Or on closer reading,

[Environment]::GetEnvironmentVariables("Machine")
?
Support
2021-03-30T08:15:50Z
Originally Posted by: keithdavis 

Currently, on several machines, we use Task Scheduler to export the environment variables of those machines to a text file for backup (we've had issues with these being deleted and also if we have to rebuild a machine from scratch). Right now, we do that using a batch file that contains:

set>C:\Users\%USERNAME%\Documents\Personal\ExportBackups\%COMPUTERNAME%-ENV.txt

Actually, we don't need the user environment variables (or we could use SYSTEM), but I can't seem to find a way to do the "set" command from VisualCron. Any ideas?



System->Environment->Set Variable Task?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
keithdavis
2021-05-24T12:30:41Z
I'm not sure what you mean. The "set" command without any parameters in Windows displays all environment variables, it does not set a variable.
Danny van Oijen
2021-06-01T14:51:50Z
Run this as a powershell
Main settings choose scope remote and enter the computername.
For script use:
cmd.exe /C set
keithdavis
2021-06-01T15:57:06Z
That works! You so awesome!!
Scroll to Top