﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
37462	Add Execution Policy guidance for PowerShell users	Jonathan Biemond	sibling ticket contributors	"Proposal to add instructions on how to set the execution policy for PowerShell users in the ''Install Django on Windows'' and ''Writing your first contribution'' pages.

Presently, the docs include commands for Windows users to activate the virtual environment in the [https://docs.djangoproject.com/en/6.1/howto/windows/#setting-up-a-virtual-environment Installing Django on Windows] and the [https://docs.djangoproject.com/en/dev/intro/contributing/#getting-a-copy-of-django-s-development-version Writing your first contribution] tutorials. Ticket #37452 generalizes the activation command to work for both Command Prompt and PowerShell users.

PowerShell users may have to set the execution policy before they can run the virtual environment activation script.
{{{
...\.venv\Scripts\Activate.ps1 cannot be loaded because running scripts is 
disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ .\Scripts\activate
+ ~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
}}}

**To simplify the experience for new Django users and contributors, the docs should include instructions with a command to set the execution policy.**

There are various options for the level of execution policy to set, and has been discussed in the forum. https://forum.djangoproject.com/t/virtual-environment-on-windows/8445

The Python docs, in their virtual environment tutorial, recommend the following:
https://docs.python.org/3/library/venv.html?#creating-virtual-environments
{{{
PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
}}}
"	Cleanup/optimization	assigned	Documentation	6.1	Normal		docs windows tutorial powershell		Unreviewed	0	0	0	0	1	0
