Skip to content

Instantly share code, notes, and snippets.

@BenjaminArmstrong
Last active September 16, 2016 17:46
Show Gist options
  • Save BenjaminArmstrong/bb9b0b1c5df4ba900e6f4410e7ae5e24 to your computer and use it in GitHub Desktop.
Save BenjaminArmstrong/bb9b0b1c5df4ba900e6f4410e7ae5e24 to your computer and use it in GitHub Desktop.
PowerShell Direct Tips - Variables
$foo = "7"
Invoke-Command -VMName "Test" {
param($localfoo)
write-host $localfoo
} -ArgumentList $foo
$foo = "7"
Invoke-Command -VMName "Test" {
write-host $Using:foo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment