Set Environmental Variable remotely

Syntax

setx /s <host> /u <domain\user> /p <pw> <variable> <value>

Example

Some users were missing %JAVA_HOME% variable for a proprietary software and I set it remotely with this command:

setx /s PC1234 /u itdb\kek /p 123456 JAVA_HOME "C:\Program Files\Java\jre1.8.0_73"

Note: Requires administrator access on the remote client

Was this post helpful?
Yes
No
Powered by Helpful

Leave a Reply

Your email address will not be published. Required fields are marked *