@darrion.kuhn
To clear a variable's content in PowerShell, you can simply assign it a value of $null or an empty string.
Here is an example:
1 2 |
$variable = "This is some content" $variable = $null |
Alternatively, you can also use the Set-Variable cmdlet to clear a variable's content:
1
|
Set-Variable -Name variable -Value $null |