Reset All Environment Variables in Postman Prerequest Script

I want to ā€œReset Allā€ environment variables before running a test. By Reset All, I mean reset them back to their original state and not unset them - so like you would if you were in the environment menu and clicked ā€œReset Allā€. Canā€™t seem to figure out how to do this, but it seems like a pretty necessary clean up practice?

Hi @dylan-neal
Iā€™d probably do it slightly differently.
Instead of ā€˜at the end, resetā€™ I would ā€˜At the beginning, setupā€™
And set all my expected variables with
pm.environment.set(variableName:String, variableValue:*)
In a pre-req script at the start of the test.
Each test run automatically sets the correct variables then.

Just found this example someone has built.

Hope it helps :upside_down_face: