# Envrc Alternative for Windows
## Metadata
**Status**:: #x
**Zettel**:: #zettel/permanent
**Created**:: [[2024-04-05]]
**Topic**:: [[♯ Development Environment]]
**Parent**:: [[♯ Windows]]
## Synopsis
> [!tldr]
> Posted: [[§ Envrc Alternative for PowerShell in Windows|Envrc Alternative for PowerShell in Windows]]
Create a file `.envrc.ps1`
```powershell
$env:TOKEN = "secret"
function global:helper-function {
python3 scripts/helper-function.py
}
function global:down {
$env:TOKEN = ""
Remove-Item Function:helper-function
Remove-Item Function:down
}
```
Setup environment
```
. .envrc.ps1
```
Teardown environment
```
down
```
## Python Virtualenv
Setup the virtualenv first
```
python -m venv .venv
```
Create `.envrc.ps1`
```powershell
. .venv\Scripts\Activate.ps1
function global:down {
deactivate
}
```