Powershell Tip #141: How to swap two variables By powershellgu | November 18, 2018 0 Comment Tip: You can swap (mutually exchanging their values) two variables. PowerShell $a = "a" $b = "b" # Swap $a, $b = $b, $a 12345 $a = "a"$b = "b" # Swap$a, $b = $b, $a