Skip to content

Instantly share code, notes, and snippets.

@fRanK45jPm
Created July 21, 2021 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fRanK45jPm/41cad8298224eb8de31b2e2f9d68a1d6 to your computer and use it in GitHub Desktop.
Save fRanK45jPm/41cad8298224eb8de31b2e2f9d68a1d6 to your computer and use it in GitHub Desktop.
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[String]
$ResourceGroupName,
[Parameter(Mandatory=$true)]
[String]
$VirtualMachineName,
[Parameter(Mandatory=$true)]
[String]
$ComputerName
)
[System.Environment]::SetEnvironmentVariable('ResourceGroupName', $ResourceGroupName, [System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('VirtualMachineName', $VirtualMachineName, [System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('ComputerName', $ComputerName, [System.EnvironmentVariableTarget]::Machine)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment