0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
JPPINTO
  • Home
  • Certifications
  • About
  • Contact
  • Gallery
  • Current Setup
Contact

Search

June 23, 2026 / PowerShell, Windows 10

Make Sure PowerShell Scripts Can Run on Windows

Tags: bypass, execution policy, powershell, run powershell script, set-executionpolicy, unrestricted

Windows can block PowerShell scripts depending on the current execution policy. If you download or create a .ps1 file and PowerShell refuses to run it, check the execution policy first and choose the least broad setting that works for your test environment.

What It Does

  • Shows the current PowerShell execution policy.
  • Allows scripts to run for the current user or current PowerShell session.
  • Explains the difference between Unrestricted and Bypass.
  • Keeps the commands focused on script testing and local admin work.

Check the Current Execution Policy

Open PowerShell and run:

Get-ExecutionPolicy -List

This shows the policy at each scope. A more specific scope, such as Process or CurrentUser, can override a broader machine-level policy.

Allow Scripts for the Current User

Use Unrestricted when you want the current Windows user to be able to run local PowerShell scripts:

Set-ExecutionPolicy Unrestricted -Scope CurrentUser

PowerShell may ask you to confirm the change. After this is set, run your script with a path like:

.\script_location\scriptname.ps1

Allow Scripts for This PowerShell Window Only

Use Bypass at the Process scope when you only want the setting to apply to the current PowerShell session:

Set-ExecutionPolicy Bypass -Scope Process

This is useful for one-time testing because the setting goes away when you close that PowerShell window.

Run the Script

After setting the policy, run the script from PowerShell:

.\script_location\scriptname.ps1

For example:

Set-Location C:\Scripts
.\genpptx.ps1

When you are done testing, you can set your current-user policy back to a more restrictive default:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Post Views: 7
<- PowerShell Script to Generate SharePoint PowerPoint Version History with Microsoft Graph
Install WP-CLI on Windows and Run Basic WordPress Commands ->

Categories

  • Active Directory (5)
  • AI (1)
  • Amazon Cloud Services (1)
  • Blazor (1)
  • C# (C-Sharp) (3)
  • CI/CD Pipelines (1)
  • Containers (4)
  • Deployment (2)
  • Development (3)
  • Docker (3)
  • General (5)
  • IIS 6.0 (4)
  • IIS 7.0 (10)
  • IIS 8.0 (1)
  • Infrastructure as Code (IaC) (1)
  • Kubernetes (3)
  • Microsoft 365 (2)
  • MySQL (1)
  • Office 2010 (1)
  • PHP (1)
  • PowerShell (6)
  • SharePoint 2007 (8)
  • SharePoint 2010 (19)
  • SharePoint 2013 (2)
  • SharePoint Online (1)
  • SMTP (4)
  • SQL Server 2008 (1)
  • SQL Server 2008 R2 (1)
  • SQL Server 2012 (2)
  • SQL Server 2019 (1)
  • Uncategorized (1)
  • URL Rewrite (2)
  • Visual Studio 2019 (1)
  • Visual Studio Code (1)
  • Windows 10 (4)
  • Windows 2003 (9)
  • Windows 2008 (18)
  • Windows 2012 (6)
  • Windows 7 (3)
  • Windows Firewall (1)
  • Windows Vista (1)
  • WordPress (4)
  • WP-CLI (3)

Recent Posts

  • Use AGENTS.md, CLAUDE.md, Cursor Rules, and Prompt Logs to Keep AI Coding Bots in Context
  • Copy WordPress Plugin Settings from Dev to Production with WP-CLI
  • Move WordPress Articles from Dev to Production with WP-CLI
  • Install WP-CLI on Windows and Run Basic WordPress Commands
  • Make Sure PowerShell Scripts Can Run on Windows

Advertisement

Tags

backconnectionhostnames custom column dev to production disable shutdown event tracker error opening exe exe permissions externalize blob externalize sharepoint data filezilla server firewall rules filazilla full installation http redirect https https redirect IIS iis7 iis 7 installation IIS installation index server configuration installing cumulative updates load balance central administration microsoft 365 moss advanced search nlb no default gateway powerpoint powershell redirect http to https search column sharepoint 2010 cumulative updates sharepoint 2010 farm build sharepoint 2010 farm configuration sharepoint 2010 farm installation sharepoint data externalization shutdown event tracker shutdown tracker SMTP storagepoint Windows 7 windows firewall configuration windows server 2008 wlbs wordpress wp-cli x86
© 2026 JPPinto.com – Tech Blog. All rights reserved.