S
Setx
Set environment variable permanently by writing variables to the master environment in the registry
On a local system, variables created and modified by this tool will be available in future command windows but not in the current CMD.exe command window
On a remote system, variables created or modified by this tool will be available at the next logon session
Example:
setx machinename test: set machinname variable to test
setx /S server /U user /P password mypath ^%Path^%: set mypath variable in remote system named server
Systeminfo
Get uptime: systeminfo | findstr "Boot Time"
Last updated