I want to remove all user-created variables at the start of a script.
Currently I am doing Remove-Variable -Name * but it tries to dele
Remove-Variable -Name *
You can't. You'll have to keep track of the available variables before the script started and remove any variables added after the script executed.