ForcePS - Allows you to run a PowerShell script from the Command Prompt bypassing Windows PowerShell Script Execution Policy.

No more "File PSscript.ps1 cannot be loaded because running scripts is disabled on this system." messages!

"Laziness is the mother of invention."

I wrote ForcePS because I was lazy and didn't want to keep changing my Windows PowerShell Script Execution Policy back and forth to run scripts. So I made a little one line batch file that would call PowerShell with the appropriate parameters to bypass the execution policy. Now I've added some error checking, compiled it, and have released it to the world for others who can't remember or don't want to have to type "Set-ExecutionPolicy Unrestricted" and "Set-ExecutionPolicy Restricted" repeatedly. Now you can just run ForcePS from the Command Prompt followed by the name of a PowerShell script and... Walah! The PS script will run without hassle, all without you having to change any settings. Elevated Command Prompt required for some small sense of security.


USAGE: ForcePS PSscript.ps1 parameter1 parameter2

Install-Package forceps -Version
dotnet add package forceps --version
<PackageReference Include="forceps" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add forceps --version
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: forceps,"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install forceps as a Cake Addin
#addin nuget:?package=forceps&version=

// Install forceps as a Cake Tool
#tool nuget:?package=forceps&version=
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes


* v1.0.0.2 - v1.0.0.1 repushed WITH the EXE this time(!)
* v1.0.0.1 - updated donation link :)
* v1.0 - initial release



This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated 299 8/11/2019 328 2/24/2019