| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Users/All Users/chocolatey/helpers/ |
Upload File : |
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<command:details>
<command:name>Get-EnvironmentVariable</command:name>
<command:verb>Get</command:verb>
<command:noun>EnvironmentVariable</command:noun>
<maml:description>
<maml:para>Gets an Environment Variable.</maml:para>
</maml:description>
</command:details>
<maml:description>
<maml:para>This will will get an environment variable based on the variable name and scope while accounting whether to expand the variable or not (e.g.: `%TEMP%`-> `C:\User\Username\AppData\Local\Temp`).</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Get-EnvironmentVariable</maml:name>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>The environment variable you want to get the value from.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
<maml:name>Scope</maml:name>
<maml:description>
<maml:para>The environment variable target scope. This is `Process`, `User`, or `Machine`.</maml:para>
</maml:description>
<command:parameterValueGroup>
<command:parameterValue required="false" command:variableLength="false">Process</command:parameterValue>
<command:parameterValue required="false" command:variableLength="false">User</command:parameterValue>
<command:parameterValue required="false" command:variableLength="false">Machine</command:parameterValue>
</command:parameterValueGroup>
<command:parameterValue required="true" variableLength="false">EnvironmentVariableTarget</command:parameterValue>
<dev:type>
<maml:name>EnvironmentVariableTarget</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>PreserveVariables</maml:name>
<maml:description>
<maml:para>Whether you want to expand embedded environment variable names or not. When not set, variables will be expanded.</maml:para>
</maml:description>
<dev:type>
<maml:name>SwitchParameter</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>False</dev:defaultValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>The environment variable you want to get the value from.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>PreserveVariables</maml:name>
<maml:description>
<maml:para>Whether you want to expand embedded environment variable names or not. When not set, variables will be expanded.</maml:para>
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
<dev:type>
<maml:name>SwitchParameter</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>False</dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
<maml:name>Scope</maml:name>
<maml:description>
<maml:para>The environment variable target scope. This is `Process`, `User`, or `Machine`.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">EnvironmentVariableTarget</command:parameterValue>
<dev:type>
<maml:name>EnvironmentVariableTarget</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes />
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name>System.String</maml:name>
</dev:type>
<maml:description>
<maml:para>Outputs the value of the target environment variable as a string.</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<maml:alertSet>
<maml:alert>
<maml:para>This helper reduces the number of lines one would have to write to get environment variables, mainly when not expanding the variables is a must.</maml:para>
</maml:alert>
</maml:alertSet>
<command:examples>
<command:example>
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\> Get-EnvironmentVariable -Name 'TEMP' -Scope User -PreserveVariables</dev:code>
<dev:remarks>
<maml:para>Gets the `TEMP` encironment variable from the user scope, without expanding embedded environment variables.</maml:para>
</dev:remarks>
</command:example>
<command:example>
<maml:title>-------------------------- Example 2 --------------------------</maml:title>
<dev:code>PS C:\> Get-EnvironmentVariable -Name 'PATH' -Scope Machine</dev:code>
<dev:remarks>
<maml:para>Gets the `PATH` environment variable from the machine scope, expanding embedded environment variables.</maml:para>
</dev:remarks>
</command:example>
</command:examples>
<command:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online Version:</maml:linkText>
<maml:uri>https://docs.chocolatey.org/en-us/create/functions/get-environmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Get-EnvironmentVariableNames</maml:linkText>
<maml:uri>xref:get-environmentvariablenames</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Set-EnvironmentVariable</maml:linkText>
<maml:uri>xref:set-environmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Cmdlet Reference</maml:linkText>
<maml:uri>xref:powershell-cmdlet-reference</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Function Reference</maml:linkText>
<maml:uri>xref:powershell-reference</maml:uri>
</maml:navigationLink>
</command:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<command:details>
<command:name>Get-EnvironmentVariableNames</command:name>
<command:verb>Get</command:verb>
<command:noun>EnvironmentVariableNames</command:noun>
<maml:description>
<maml:para>Gets all environment variable names.</maml:para>
</maml:description>
</command:details>
<maml:description>
<maml:para>Provides a list of environment variable names based on the scope. This can be used to loop through the list and generate names.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Get-EnvironmentVariableNames</maml:name>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
<maml:name>Scope</maml:name>
<maml:description>
<maml:para>The environment variable target scope. This is `Process`, `User`, or `Machine`.</maml:para>
</maml:description>
<command:parameterValueGroup>
<command:parameterValue required="false" command:variableLength="false">Process</command:parameterValue>
<command:parameterValue required="false" command:variableLength="false">User</command:parameterValue>
<command:parameterValue required="false" command:variableLength="false">Machine</command:parameterValue>
</command:parameterValueGroup>
<command:parameterValue required="true" variableLength="false">EnvironmentVariableTarget</command:parameterValue>
<dev:type>
<maml:name>EnvironmentVariableTarget</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
<maml:name>Scope</maml:name>
<maml:description>
<maml:para>The environment variable target scope. This is `Process`, `User`, or `Machine`.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">EnvironmentVariableTarget</command:parameterValue>
<dev:type>
<maml:name>EnvironmentVariableTarget</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes />
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name>System.String</maml:name>
</dev:type>
<maml:description>
<maml:para>Outputs the names of all the environment variables in the target scope as strings.</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<maml:alertSet>
<maml:alert>
<maml:para>Process dumps the current environment variable names in memory / session. The other scopes refer to the registry values.</maml:para>
</maml:alert>
</maml:alertSet>
<command:examples>
<command:example>
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\> Get-EnvironmentVariableNames -Scope Machine</dev:code>
<dev:remarks>
<maml:para>Outputs the names of all the environment variables defined in the registry for the Machine scope.</maml:para>
</dev:remarks>
</command:example>
</command:examples>
<command:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online Version:</maml:linkText>
<maml:uri>https://docs.chocolatey.org/en-us/create/functions/get-environmentvariablenames</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Get-EnvironmentVariable</maml:linkText>
<maml:uri>xref:get-environmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Set-EnvironmentVariable</maml:linkText>
<maml:uri>xref:set-environmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Cmdlet Reference</maml:linkText>
<maml:uri>xref:powershell-cmdlet-reference</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Function Reference</maml:linkText>
<maml:uri>xref:powershell-reference</maml:uri>
</maml:navigationLink>
</command:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<command:details>
<command:name>Install-ChocolateyPath</command:name>
<command:verb>Install</command:verb>
<command:noun>ChocolateyPath</command:noun>
<maml:description>
<maml:para>> :choco-info: NOTE > > Administrative Access Required when `-PathType 'Machine'.`</maml:para>
<maml:para>This puts a directory to the PATH environment variable.</maml:para>
</maml:description>
</command:details>
<maml:description>
<maml:para>Looks at both PATH environment variables to ensure a path variable correctly shows up on the right PATH.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Install-ChocolateyPath</maml:name>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="PathToInstall">
<maml:name>Path</maml:name>
<maml:description>
<maml:para>The full path to a location to add / ensure is in the PATH.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="Scope, Type">
<maml:name>PathType</maml:name>
<maml:description>
<maml:para>Which PATH to add it to. If specifying `Machine`, this requires admin privileges to run correctly.</maml:para>
</maml:description>
<command:parameterValueGroup>
<command:parameterValue required="false" command:variableLength="false">Process</command:parameterValue>
<command:parameterValue required="false" command:variableLength="false">User</command:parameterValue>
<command:parameterValue required="false" command:variableLength="false">Machine</command:parameterValue>
</command:parameterValueGroup>
<command:parameterValue required="true" variableLength="false">EnvironmentVariableTarget</command:parameterValue>
<dev:type>
<maml:name>EnvironmentVariableTarget</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="PathToInstall">
<maml:name>Path</maml:name>
<maml:description>
<maml:para>The full path to a location to add / ensure is in the PATH.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="Scope, Type">
<maml:name>PathType</maml:name>
<maml:description>
<maml:para>Which PATH to add it to. If specifying `Machine`, this requires admin privileges to run correctly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">EnvironmentVariableTarget</command:parameterValue>
<dev:type>
<maml:name>EnvironmentVariableTarget</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes />
<command:returnValues />
<maml:alertSet>
<maml:alert>
<maml:para>This command will assert UAC/Admin privileges on the machine if `-PathType 'Machine'`.</maml:para>
<maml:para>This is used when the application/tool is not being linked by Chocolatey (not in the lib folder).</maml:para>
</maml:alert>
</maml:alertSet>
<command:examples>
<command:example>
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\> Install-ChocolateyPath -PathToInstall "$($env:SystemDrive)\tools\gittfs"</dev:code>
<dev:remarks>
<maml:para>Adds the target path to the current user's PATH.</maml:para>
</dev:remarks>
</command:example>
<command:example>
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\> Install-ChocolateyPath "$($env:SystemDrive)\Program Files\MySQL\MySQL Server 5.5\bin" -PathType 'Machine'</dev:code>
<dev:remarks>
<maml:para>Adds the target path to the system-wide PATH.</maml:para>
</dev:remarks>
</command:example>
</command:examples>
<command:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online Version:</maml:linkText>
<maml:uri>https://docs.chocolatey.org/en-us/create/functions/install-chocolateypath</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Uninstall-ChocolateyPath</maml:linkText>
<maml:uri>xref:uninstall-chocolateypath</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Install-ChocolateyEnvironmentVariable</maml:linkText>
<maml:uri>xref:install-chocolateyenvironmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Get-EnvironmentVariable</maml:linkText>
<maml:uri>xref:get-environmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Set-EnvironmentVariable</maml:linkText>
<maml:uri>xref:set-environmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Get-ToolsLocation</maml:linkText>
<maml:uri>xref:get-toolslocation</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Cmdlet Reference</maml:linkText>
<maml:uri>xref:powershell-cmdlet-reference</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Function Reference</maml:linkText>
<maml:uri>xref:powershell-reference</maml:uri>
</maml:navigationLink>
</command:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<command:details>
<command:name>Set-EnvironmentVariable</command:name>
<command:verb>Set</command:verb>
<command:noun>EnvironmentVariable</command:noun>
<maml:description>
<maml:para>> :choco-info: NOTE > > Administrative Access Required when `-Scope 'Machine'.`</maml:para>
<maml:para>DO NOT USE. Not part of the public API. Use `Install-ChocolateyEnvironmentVariable` instead.</maml:para>
</maml:description>
</command:details>
<maml:description>
<maml:para>Saves an environment variable.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Set-EnvironmentVariable</maml:name>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>The name of the environment variable to set.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
<maml:name>Value</maml:name>
<maml:description>
<maml:para>The value to set the named environment variable to.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
<maml:name>Scope</maml:name>
<maml:description>
<maml:para>The scope to set the environment variable at.</maml:para>
</maml:description>
<command:parameterValueGroup>
<command:parameterValue required="false" command:variableLength="false">Process</command:parameterValue>
<command:parameterValue required="false" command:variableLength="false">User</command:parameterValue>
<command:parameterValue required="false" command:variableLength="false">Machine</command:parameterValue>
</command:parameterValueGroup>
<command:parameterValue required="true" variableLength="false">EnvironmentVariableTarget</command:parameterValue>
<dev:type>
<maml:name>EnvironmentVariableTarget</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>The name of the environment variable to set.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
<maml:name>Scope</maml:name>
<maml:description>
<maml:para>The scope to set the environment variable at.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">EnvironmentVariableTarget</command:parameterValue>
<dev:type>
<maml:name>EnvironmentVariableTarget</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
<maml:name>Value</maml:name>
<maml:description>
<maml:para>The value to set the named environment variable to.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes />
<command:returnValues />
<maml:alertSet>
<maml:alert>
<maml:para>This command will assert UAC/Admin privileges on the machine if `-Scope 'Machine'`.</maml:para>
</maml:alert>
</maml:alertSet>
<command:examples>
<command:example>
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\> Set-EnvironmentVariable -Name MyApplicationPath -Value C:\test -Scope Machine</dev:code>
<dev:remarks>
<maml:para>Sets the `MyApplicationPath` environment variable to `C:\test` at the system level.</maml:para>
</dev:remarks>
</command:example>
</command:examples>
<command:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online Version:</maml:linkText>
<maml:uri>https://docs.chocolatey.org/en-us/create/functions/set-environmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Install-ChocolateyEnvironmentVariable</maml:linkText>
<maml:uri>xref:install-chocolateyenvironmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Uninstall-ChocolateyEnvironmentVariable</maml:linkText>
<maml:uri>xref:uninstall-chocolateyenvironmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Install-ChocolateyPath</maml:linkText>
<maml:uri>xref:install-chocolateypath</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Get-EnvironmentVariable</maml:linkText>
<maml:uri>xref:get-environmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Cmdlet Reference</maml:linkText>
<maml:uri>xref:powershell-cmdlet-reference</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Function Reference</maml:linkText>
<maml:uri>xref:powershell-reference</maml:uri>
</maml:navigationLink>
</command:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<command:details>
<command:name>Test-ProcessAdminRights</command:name>
<command:verb>Test</command:verb>
<command:noun>ProcessAdminRights</command:noun>
<maml:description>
<maml:para>Tests whether the current process is running with administrative rights.</maml:para>
</maml:description>
</command:details>
<maml:description>
<maml:para>This function checks whether the current process has administrative rights by checking if the current user identity is a member of the Administrators group. It returns `$true` if the current process is running with administrative rights, `$false` otherwise.</maml:para>
<maml:para>On Windows Vista and later, with UAC enabled, the returned value represents the actual rights available to the process, for example if it returns `$true`, the process is running elevated.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Test-ProcessAdminRights</maml:name>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes />
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name>System.Boolean</maml:name>
</dev:type>
<maml:description>
<maml:para>Outputs `$true` if the current process has admin rights, otherwise `$false`.</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<maml:alertSet>
<maml:alert>
<maml:para></maml:para>
</maml:alert>
</maml:alertSet>
<command:examples>
<command:example>
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\> Test-ProcessAdminRights</dev:code>
<dev:remarks>
<maml:para>Outputs `$true` if the current process is elevated, otherwise `$false`.</maml:para>
</dev:remarks>
</command:example>
</command:examples>
<command:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online Version:</maml:linkText>
<maml:uri>https://docs.chocolatey.org/en-us/create/functions/test-processadminrights</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Cmdlet Reference</maml:linkText>
<maml:uri>xref:powershell-cmdlet-reference</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Function Reference</maml:linkText>
<maml:uri>xref:powershell-reference</maml:uri>
</maml:navigationLink>
</command:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<command:details>
<command:name>Uninstall-ChocolateyPath</command:name>
<command:verb>Uninstall</command:verb>
<command:noun>ChocolateyPath</command:noun>
<maml:description>
<maml:para>> :choco_info: NOTE > > Administrative Access Required when `-PathType 'Machine'.`</maml:para>
<maml:para>This puts a directory to the PATH environment variable.</maml:para>
</maml:description>
</command:details>
<maml:description>
<maml:para>Ensures that the given path is not present in the given type of PATH environment variable as well as in the current session.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Uninstall-ChocolateyPath</maml:name>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="PathToUninstall">
<maml:name>Path</maml:name>
<maml:description>
<maml:para>The exact path to remove from the environment PATH.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="Scope, Type">
<maml:name>PathType</maml:name>
<maml:description>
<maml:para>Which PATH to add it to. If specifying `Machine`, this requires admin privileges to run correctly.</maml:para>
</maml:description>
<command:parameterValueGroup>
<command:parameterValue required="false" command:variableLength="false">Process</command:parameterValue>
<command:parameterValue required="false" command:variableLength="false">User</command:parameterValue>
<command:parameterValue required="false" command:variableLength="false">Machine</command:parameterValue>
</command:parameterValueGroup>
<command:parameterValue required="true" variableLength="false">EnvironmentVariableTarget</command:parameterValue>
<dev:type>
<maml:name>EnvironmentVariableTarget</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="PathToUninstall">
<maml:name>Path</maml:name>
<maml:description>
<maml:para>The exact path to remove from the environment PATH.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="Scope, Type">
<maml:name>PathType</maml:name>
<maml:description>
<maml:para>Which PATH to add it to. If specifying `Machine`, this requires admin privileges to run correctly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">EnvironmentVariableTarget</command:parameterValue>
<dev:type>
<maml:name>EnvironmentVariableTarget</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes />
<command:returnValues />
<maml:alertSet>
<maml:alert>
<maml:para>This command will assert UAC/Admin privileges on the machine if `-PathType 'Machine'`. This is used when the application/tool is not being linked by Chocolatey (not in the lib folder).</maml:para>
</maml:alert>
</maml:alertSet>
<command:examples>
<command:example>
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\> Uninstall-ChocolateyPath -PathToUninstall "$($env:SystemDrive)\tools\gittfs"</dev:code>
<dev:remarks>
<maml:para>Removes the target path from the current user's PATH environment variable.</maml:para>
</dev:remarks>
</command:example>
<command:example>
<maml:title>-------------------------- Example 2 --------------------------</maml:title>
<dev:code>PS C:\> Uninstall-ChocolateyPath "$($env:SystemDrive)\Program Files\MySQL\MySQL Server 5.5\bin" -PathType 'Machine'</dev:code>
<dev:remarks>
<maml:para>Removes the target path from the system-wide PATH environment variable.</maml:para>
</dev:remarks>
</command:example>
</command:examples>
<command:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online Version:</maml:linkText>
<maml:uri>https://docs.chocolatey.org/en-us/create/functions/uninstall-chocolateypath</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Install-ChocolateyPath</maml:linkText>
<maml:uri>xref:install-chocolateypath</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Install-ChocolateyEnvironmentVariable</maml:linkText>
<maml:uri>xref:install-chocolateyenvironmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Get-EnvironmentVariable</maml:linkText>
<maml:uri>xref:get-environmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Set-EnvironmentVariable</maml:linkText>
<maml:uri>xref:set-environmentvariable</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Get-ToolsLocation</maml:linkText>
<maml:uri>xref:get-toolslocation</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Cmdlet Reference</maml:linkText>
<maml:uri>xref:powershell-cmdlet-reference</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Function Reference</maml:linkText>
<maml:uri>xref:powershell-reference</maml:uri>
</maml:navigationLink>
</command:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<command:details>
<command:name>Update-SessionEnvironment</command:name>
<command:verb>Update</command:verb>
<command:noun>SessionEnvironment</command:noun>
<maml:description>
<maml:para>Updates the environment variables of the current powershell session with any environment variable changes that may have occurred during a Chocolatey package install.</maml:para>
</maml:description>
</command:details>
<maml:description>
<maml:para>When Chocolatey installs a package, the package author may add or change certain environment variables that will affect how the application runs or how it is accessed. Often, these changes are not visible to the current PowerShell session. This means the user needs to open a new PowerShell session before these settings take effect which can render the installed application nonfunctional until that time.</maml:para>
<maml:para>Use the Update-SessionEnvironment command to refresh the current PowerShell session with all environment settings possibly performed by Chocolatey package installs.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Update-SessionEnvironment</maml:name>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>IgnoredArguments</maml:name>
<maml:description>
<maml:para>Allows splatting with arguments that do not apply. Do not use directly.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
<dev:type>
<maml:name>Object[]</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes />
<command:returnValues />
<maml:alertSet>
<maml:alert>
<maml:para>This method is also added to the user's PowerShell profile as `refreshenv`. When called as `refreshenv`, the method will provide additional output.</maml:para>
<maml:para>Preserves `PSModulePath` as set by the process.</maml:para>
</maml:alert>
</maml:alertSet>
<command:examples>
<command:example>
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\> Update-SessionEnvironment</dev:code>
<dev:remarks>
<maml:para>Updates the current session environment variables.</maml:para>
</dev:remarks>
</command:example>
</command:examples>
<command:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online Version:</maml:linkText>
<maml:uri>https://docs.chocolatey.org/en-us/create/functions/update-sessionenvironment</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Cmdlet Reference</maml:linkText>
<maml:uri>xref:powershell-cmdlet-reference</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Function Reference</maml:linkText>
<maml:uri>xref:powershell-reference</maml:uri>
</maml:navigationLink>
</command:relatedLinks>
</command:command>
</helpItems>