Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

Execution Policy Cannot run PowerShell Compact Archive Tool

Nicholas Gautier edited this page Dec 18, 2022 · 6 revisions

Please Read

PowerShell Compact-Archive Tool starting from version 1.1.0 will no longer require you to configure your ExecutionPolicywithin PowerShell. Instead, please use the "Bootstrap Loader.bat" located within the Start Menu after installation - which will help launch PSCAT for you without any fuss. As such, you may skip this tutorial. I want to keep this page available only incase if someone needs it for specific reasons, or if needing to run an earlier version of PSCAT.


ExecutionPolicy Error

If trying to run the PowerShell Compact-Archive Tool, or any PowerShell script for that matter, one must first configure PowerShell to allow unsigned scripts to be executable within the shell's environment. By default, PowerShell will only execute scripts that are signed within the system itself. Microsoft enforces this rule only for security means - to protect its users from any malicious scripts from doing any malevolent activity within their system's. While this is kind-of an inconvenience to us, it should be noted that not all users need this functionality out-of-the-box - and with the default setting it is potentially protecting them. But, again, the draw-back is - it is not possible for us to easily run the PowerShell Compact-Archive Tool program with the default ExecutionPolicy set. We will have to configure the ExecutionPolicy by using the CMDLet Set-ExecutionPolicy within PowerShell.

Step-By-Step

Below are the steps to configure the Set_ExecutionPolicy such that the PSCAT application will work correctly within your system. These instructions are written on a beginner level, which will allow everyone to easily follow along.

Open PowerShell as an Administrator

In this step, we will launch the PowerShell application with Administrative roles. We will need the Administrative rights as we will configure how PowerShell interacts with the scripts, thus this configures the system's internal settings.

  1. Open the Start Menu

  2. Begin immediately typing "Windows PowerShell"
    Windows Search - Find PowerShell

  3. Select "Run as Administrator" with the PowerShell application highlighted.
    Windows Search - Start PowerShell with Administrative Rights

With this step, we just launched PowerShell with Administrative rights. In the next step, we will configure the Set-ExecutionPolicy.

Configure Execution Policy

In this step, we will manipulate the Execution Policy using the Set-ExecutionPolicy CMDLet. By doing this, ultimately, we will be able to run any program within PowerShell.

  1. Type the following:
    Set-ExecutionPolicy -ExecutionPolicy Unrestricted
    Set the Execution Policy in PowerShell

  2. Accept the risks by typing 'y' and providing the 'Enter' key to confirm.
    Confirmation of setting the Execution Policy

  3. All done!
    Execution Policy Finished

In this last step, we configured PowerShell's Execution Policy such that it is now possible to run any PowerShell based applications freely within the system.

Clone this wiki locally