Powershell: How to Clear a Variable
Clearing a variable is quite straight forward. One thing to keep in mind though is to leave the $ out of the command.
Also if the variable is an array, we need to remember to remake it into an array again.
Clear-Variable <Variablename>
Example ($Fantastic):
Clear-Variable Fantastic
Remake the variable into an array again.
$Fantastic = ""
$Fantastic = @()
No comments:
Post a Comment