snippetbashTip
set — Display or set environment variables for the current instance of CMD. More information: <https://lea
Viewed 0 times
commandclienvironmentvariablessetfordisplay
windows
Problem
How to use the
set command: Display or set environment variables for the current instance of CMD. More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/set>.Solution
set — Display or set environment variables for the current instance of CMD. More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/set>.List all current environment variables:
setSet an environment variable to a specific value:
set {{name}}={{value}}List environment variables starting with the specified string:
set {{name}}Prompt the user for a value for the specified variable:
set /p {{name}}={{prompt_string}}Code Snippets
List all current environment variables
setSet an environment variable to a specific value
set {{name}}={{value}}List environment variables starting with the specified string
set {{name}}Prompt the user for a value for the specified variable
set /p {{name}}={{prompt_string}}Context
tldr-pages: windows/set
Revisions (0)
No revisions yet.